Anatolij Gustschin | 4e92e60 | 2018-12-01 10:47:20 +0100 | [diff] [blame] | 1 | // 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 Rini | d678a59 | 2024-05-18 20:20:43 -0600 | [diff] [blame] | 8 | #include <common.h> |
Anatolij Gustschin | 4e92e60 | 2018-12-01 10:47:20 +0100 | [diff] [blame] | 9 | #include <command.h> |
Simon Glass | cde03fa | 2023-10-01 19:15:23 -0600 | [diff] [blame] | 10 | #include <console.h> |
Anatolij Gustschin | 4e92e60 | 2018-12-01 10:47:20 +0100 | [diff] [blame] | 11 | #include <dm.h> |
Heinrich Schuchardt | bfaa51d | 2022-02-11 18:11:05 +0100 | [diff] [blame] | 12 | |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 13 | static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc, |
Anatolij Gustschin | 4e92e60 | 2018-12-01 10:47:20 +0100 | [diff] [blame] | 14 | char *const argv[]) |
| 15 | { |
Simon Glass | cde03fa | 2023-10-01 19:15:23 -0600 | [diff] [blame] | 16 | if (console_clear()) |
| 17 | return CMD_RET_FAILURE; |
Simon Glass | a76b60f | 2023-03-10 12:47:21 -0800 | [diff] [blame] | 18 | |
Anatolij Gustschin | 4e92e60 | 2018-12-01 10:47:20 +0100 | [diff] [blame] | 19 | return CMD_RET_SUCCESS; |
| 20 | } |
| 21 | |
| 22 | U_BOOT_CMD(cls, 1, 1, do_video_clear, "clear screen", ""); |