blob: 4bee8a18305c0c3f41012a7262c1ac1bc0567d53 [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 */
Anatolij Gustschin4e92e602018-12-01 10:47:20 +01008#include <command.h>
Simon Glasscde03fa2023-10-01 19:15:23 -06009#include <console.h>
Anatolij Gustschin4e92e602018-12-01 10:47:20 +010010#include <dm.h>
Heinrich Schuchardtbfaa51d2022-02-11 18:11:05 +010011
Simon Glass09140112020-05-10 11:40:03 -060012static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
Anatolij Gustschin4e92e602018-12-01 10:47:20 +010013 char *const argv[])
14{
Simon Glasscde03fa2023-10-01 19:15:23 -060015 if (console_clear())
16 return CMD_RET_FAILURE;
Simon Glassa76b60f2023-03-10 12:47:21 -080017
Anatolij Gustschin4e92e602018-12-01 10:47:20 +010018 return CMD_RET_SUCCESS;
19}
20
21U_BOOT_CMD(cls, 1, 1, do_video_clear, "clear screen", "");