blob: 80d0558d46791008fc49ac351d09492bf459cc5a [file] [log] [blame]
Anatolij Gustschin4e92e602018-12-01 10:47:20 +01001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2018
4 * DENX Software Engineering, Anatolij Gustschin <agust@denx.de>
5 *
6 * cls - clear screen command
7 */
Tom Rinid678a592024-05-18 20:20:43 -06008#include <common.h>
Anatolij Gustschin4e92e602018-12-01 10:47:20 +01009#include <command.h>
Simon Glasscde03fa2023-10-01 19:15:23 -060010#include <console.h>
Anatolij Gustschin4e92e602018-12-01 10:47:20 +010011#include <dm.h>
Heinrich Schuchardtbfaa51d2022-02-11 18:11:05 +010012
Simon Glass09140112020-05-10 11:40:03 -060013static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
Anatolij Gustschin4e92e602018-12-01 10:47:20 +010014 char *const argv[])
15{
Simon Glasscde03fa2023-10-01 19:15:23 -060016 if (console_clear())
17 return CMD_RET_FAILURE;
Simon Glassa76b60f2023-03-10 12:47:21 -080018
Anatolij Gustschin4e92e602018-12-01 10:47:20 +010019 return CMD_RET_SUCCESS;
20}
21
22U_BOOT_CMD(cls, 1, 1, do_video_clear, "clear screen", "");