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