Skip to contentSkip to conversation

cmd: pxe: execute the cls command only when supported

PATCH New Patrick Delaunay 3 participants 3 messages Dec 3, 2019 – Jan 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: pxe: execute the cls command only when supported

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).

---

 cmd/pxe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
cmd/pxe.c +2 -1
index 2059975446..b62cb79b3a 100644
@@ -1592,7 +1592,8 @@ static 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, load_addr)) {
-			run_command("cls", 0);
+			if (CONFIG_IS_ENABLED(CMD_CLS))
+				run_command("cls", 0);
 			bmp_display(load_addr,
 				    BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
 		} else {
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 cmd: pxe: execute the cls command only when supported

Hi Patrick

Quoted 18 lines · Patrick Delaunay

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).

---

 cmd/pxe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
cmd/pxe.c +0 -0
index 2059975446..b62cb79b3a 100644

cmd/pxe.c static void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg) · line 1599

Quoted 9 lines
cmd/pxe.c +2 -1
@@ -1592,7 +1592,8 @@ static 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, load_addr)) {
-			run_command("cls", 0);
+			if (CONFIG_IS_ENABLED(CMD_CLS))
+				run_command("cls", 0);
 			bmp_display(load_addr,
 				    BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
 		} else {

Thanks

#2 lore raw

PATCH 1/1 cmd: pxe: execute the cls command only when supported

In reply to Patrick Delaunay
Quoted 9 lines · Patrick Delaunay

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).

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200123/d86f22b7/attachment.sig>