]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: pxe: execute the cls command only when supported
authorPatrick Delaunay <patrick.delaunay@st.com>
Tue, 3 Dec 2019 08:38:35 +0000 (09:38 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 22 Jan 2020 22:49:25 +0000 (17:49 -0500)
Execute the command cls (for clear screen), when the "menu background"
keyword is present in extlinux.conf file, only if the command is supported.

This patch avoid the warning "Unknown command 'cls'"
with "menu background" in extlinux.conf when CONFIG_CMD_BMP is activated
and CONFIG_CMD_CLS not activated (default for CONFIG_DM_VIDEO).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
cmd/pxe_utils.c

index 8b830212ce163d8e55c203fac5684aedb258543a..53af04d7dc75bdef091c34f7d94c7d97ace60777 100644 (file)
@@ -1312,7 +1312,8 @@ void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
        /* display BMP if available */
        if (cfg->bmp) {
                if (get_relfile(cmdtp, cfg->bmp, image_load_addr)) {
-                       run_command("cls", 0);
+                       if (CONFIG_IS_ENABLED(CMD_CLS))
+                               run_command("cls", 0);
                        bmp_display(image_load_addr,
                                    BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
                } else {