public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] cmd: pxe: execute the cls command only when supported
@ 2019-12-03  8:38 Patrick Delaunay
  2019-12-03  9:02 ` Patrice CHOTARD
  2020-01-23 21:57 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2019-12-03  8:38 UTC (permalink / raw)
  To: u-boot

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

 cmd/pxe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmd/pxe.c b/cmd/pxe.c
index 2059975446..b62cb79b3a 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -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 {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] cmd: pxe: execute the cls command only when supported
  2019-12-03  8:38 [U-Boot] [PATCH] cmd: pxe: execute the cls command only when supported Patrick Delaunay
@ 2019-12-03  9:02 ` Patrice CHOTARD
  2020-01-23 21:57 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2019-12-03  9:02 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 12/3/19 9:38 AM, Patrick Delaunay wrote:
> 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>
> ---
>
>  cmd/pxe.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/cmd/pxe.c b/cmd/pxe.c
> index 2059975446..b62cb79b3a 100644
> --- a/cmd/pxe.c
> +++ b/cmd/pxe.c
> @@ -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 {

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] cmd: pxe: execute the cls command only when supported
  2019-12-03  8:38 [U-Boot] [PATCH] cmd: pxe: execute the cls command only when supported Patrick Delaunay
  2019-12-03  9:02 ` Patrice CHOTARD
@ 2020-01-23 21:57 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-01-23 21:57 UTC (permalink / raw)
  To: u-boot

On Tue, Dec 03, 2019 at 09:38:35AM +0100, Patrick Delaunay wrote:

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

Applied to u-boot/master, thanks!

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-23 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-03  8:38 [U-Boot] [PATCH] cmd: pxe: execute the cls command only when supported Patrick Delaunay
2019-12-03  9:02 ` Patrice CHOTARD
2020-01-23 21:57 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox