1 // SPDX-License-Identifier: GPL-2.0+
4 * DENX Software Engineering, Anatolij Gustschin <agust@denx.de>
6 * cls - clear screen command
15 static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
18 __maybe_unused struct udevice *dev;
20 /* Send clear screen and home */
21 printf(CSI "2J" CSI "1;1H");
22 if (IS_ENABLED(CONFIG_VIDEO) && !IS_ENABLED(CONFIG_VIDEO_ANSI)) {
23 if (uclass_first_device_err(UCLASS_VIDEO, &dev))
24 return CMD_RET_FAILURE;
26 return CMD_RET_FAILURE;
28 return CMD_RET_SUCCESS;
31 U_BOOT_CMD(cls, 1, 1, do_video_clear, "clear screen", "");