blob: 80d0558d46791008fc49ac351d09492bf459cc5a [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 */
8#include <common.h>
9#include <command.h>
Simon Glassffafbe32023-10-01 19:15:23 -060010#include <console.h>
Anatolij Gustschine0455a42018-12-01 10:47:20 +010011#include <dm.h>
Heinrich Schuchardtced5d412022-02-11 18:11:05 +010012
Simon Glassed38aef2020-05-10 11:40:03 -060013static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
Anatolij Gustschine0455a42018-12-01 10:47:20 +010014 char *const argv[])
15{
Simon Glassffafbe32023-10-01 19:15:23 -060016 if (console_clear())
17 return CMD_RET_FAILURE;
Simon Glass90679c62023-03-10 12:47:21 -080018
Anatolij Gustschine0455a42018-12-01 10:47:20 +010019 return CMD_RET_SUCCESS;
20}
21
22U_BOOT_CMD(cls, 1, 1, do_video_clear, "clear screen", "");