* [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n
@ 2026-05-05 9:14 Quentin Schulz
2026-05-05 9:14 ` [PATCH v3 1/2] cmd: ufetch: show net feature when NET_LWIP is selected Quentin Schulz
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Quentin Schulz @ 2026-05-05 9:14 UTC (permalink / raw)
To: u-boot
Cc: Casey Connolly, Tom Rini, Ilias Apalodimas, Andrew Goodbody,
Peter Robinson, Heinrich Schuchardt, Simon Glass, Quentin Schulz
Make sure the Net feature is printed when NET_LWIP is enabled, not only
when NET_LEGACY is.
Only print comma and following whitespace as separator if there was a
feature printed before feature to be printed.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Changes in v3:
- migrated from bool plus ternary operator for setting the separator per
printf to a const char* which contains the separator to print, as
suggested by Simon,
- Link to v2: https://patch.msgid.link/20260504-ufetch-net-v2-0-01bec4ca7169@cherry.de
Changes in v2:
- added R-b trailers,
- fixed spurious colon character before separator in cat,
- Link to v1: https://patch.msgid.link/20260428-ufetch-net-v1-0-5d58c7618239@cherry.de
---
Quentin Schulz (2):
cmd: ufetch: show net feature when NET_LWIP is selected
cmd: ufetch: only show comma separator if there was a previous feature
cmd/ufetch.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
---
base-commit: 57460fde4ba84d67de4066ee1141e89e8139ed23
change-id: 20260428-ufetch-net-1ba7553a20c7
Best regards,
--
Quentin Schulz <quentin.schulz@cherry.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/2] cmd: ufetch: show net feature when NET_LWIP is selected
2026-05-05 9:14 [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n Quentin Schulz
@ 2026-05-05 9:14 ` Quentin Schulz
2026-05-05 9:14 ` [PATCH v3 2/2] cmd: ufetch: only show comma separator if there was a previous feature Quentin Schulz
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Quentin Schulz @ 2026-05-05 9:14 UTC (permalink / raw)
To: u-boot
Cc: Casey Connolly, Tom Rini, Ilias Apalodimas, Andrew Goodbody,
Peter Robinson, Heinrich Schuchardt, Simon Glass, Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
We've had a new lwIP networking stack for a couple of years already, so
let's show there is a "net" feature if it's selected. Since NET_LEGACY
|| NET_LWIP is the same as NET, let's check on NET.
Reported-by: Simon Glass <sjg@chromium.org>
Closes: https://lore.kernel.org/u-boot/CAFLszTgZC1FGy8965pHiG-u=FhrguftRv41ghQ_Qb_RRXx6tyg@mail.gmail.com/
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
cmd/ufetch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/ufetch.c b/cmd/ufetch.c
index f8dc904bdd0..bc5db08eee1 100644
--- a/cmd/ufetch.c
+++ b/cmd/ufetch.c
@@ -159,7 +159,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,
break;
case FEATURES:
printf("Features:" RESET " ");
- if (IS_ENABLED(CONFIG_NET_LEGACY))
+ if (IS_ENABLED(CONFIG_NET))
printf("Net");
if (IS_ENABLED(CONFIG_EFI_LOADER))
printf(", EFI");
--
2.54.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] cmd: ufetch: only show comma separator if there was a previous feature
2026-05-05 9:14 [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n Quentin Schulz
2026-05-05 9:14 ` [PATCH v3 1/2] cmd: ufetch: show net feature when NET_LWIP is selected Quentin Schulz
@ 2026-05-05 9:14 ` Quentin Schulz
2026-05-05 13:58 ` Simon Glass
2026-05-05 13:47 ` [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n Casey Connolly
2026-05-05 14:14 ` Casey Connolly
3 siblings, 1 reply; 6+ messages in thread
From: Quentin Schulz @ 2026-05-05 9:14 UTC (permalink / raw)
To: u-boot
Cc: Casey Connolly, Tom Rini, Ilias Apalodimas, Andrew Goodbody,
Peter Robinson, Heinrich Schuchardt, Simon Glass, Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
Currently, if NET is disabled, the next feature to be printed will start
with a comma and a space which is not pretty. Add the comma and
whitespace only when a previous feature has already been shown.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
cmd/ufetch.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/cmd/ufetch.c b/cmd/ufetch.c
index bc5db08eee1..e7b5d773f5e 100644
--- a/cmd/ufetch.c
+++ b/cmd/ufetch.c
@@ -157,26 +157,37 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,
printf(" (%d baud)", gd->baudrate);
putc('\n');
break;
- case FEATURES:
+ case FEATURES: {
+ const char *sep = "";
+
printf("Features:" RESET " ");
- if (IS_ENABLED(CONFIG_NET))
- printf("Net");
- if (IS_ENABLED(CONFIG_EFI_LOADER))
- printf(", EFI");
- if (IS_ENABLED(CONFIG_CMD_CAT))
- printf(", cat :3");
+ if (IS_ENABLED(CONFIG_NET)) {
+ printf("%sNet", sep);
+ sep = ", ";
+ }
+ if (IS_ENABLED(CONFIG_EFI_LOADER)) {
+ printf("%sEFI", sep);
+ sep = ", ";
+ }
+ if (IS_ENABLED(CONFIG_CMD_CAT)) {
+ printf("%scat :3", sep);
+ sep = ", ";
+ }
#ifdef CONFIG_ARM64
switch (current_el()) {
case 2:
- printf(", VMs");
+ printf("%sVMs", sep);
+ sep = ", ";
break;
case 3:
- printf(", full control!");
+ printf("%sfull control!", sep);
+ sep = ", ";
break;
}
#endif
printf("\n");
break;
+ }
case RELOCATION:
if (gd->flags & GD_FLG_SKIP_RELOC)
printf("Relocated:" RESET " no\n");
--
2.54.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n
2026-05-05 9:14 [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n Quentin Schulz
2026-05-05 9:14 ` [PATCH v3 1/2] cmd: ufetch: show net feature when NET_LWIP is selected Quentin Schulz
2026-05-05 9:14 ` [PATCH v3 2/2] cmd: ufetch: only show comma separator if there was a previous feature Quentin Schulz
@ 2026-05-05 13:47 ` Casey Connolly
2026-05-05 14:14 ` Casey Connolly
3 siblings, 0 replies; 6+ messages in thread
From: Casey Connolly @ 2026-05-05 13:47 UTC (permalink / raw)
To: Quentin Schulz, u-boot
Cc: Tom Rini, Ilias Apalodimas, Andrew Goodbody, Peter Robinson,
Heinrich Schuchardt, Simon Glass, Quentin Schulz
On 05/05/2026 11:14, Quentin Schulz wrote:
> Make sure the Net feature is printed when NET_LWIP is enabled, not only
> when NET_LEGACY is.
>
> Only print comma and following whitespace as separator if there was a
> feature printed before feature to be printed.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
> ---
> Changes in v3:
> - migrated from bool plus ternary operator for setting the separator per
> printf to a const char* which contains the separator to print, as
> suggested by Simon,
> - Link to v2: https://patch.msgid.link/20260504-ufetch-net-v2-0-01bec4ca7169@cherry.de
>
> Changes in v2:
> - added R-b trailers,
> - fixed spurious colon character before separator in cat,
> - Link to v1: https://patch.msgid.link/20260428-ufetch-net-v1-0-5d58c7618239@cherry.de
>
> ---
> Quentin Schulz (2):
> cmd: ufetch: show net feature when NET_LWIP is selected
> cmd: ufetch: only show comma separator if there was a previous feature
>
> cmd/ufetch.c | 29 ++++++++++++++++++++---------
> 1 file changed, 20 insertions(+), 9 deletions(-)
> ---
> base-commit: 57460fde4ba84d67de4066ee1141e89e8139ed23
> change-id: 20260428-ufetch-net-1ba7553a20c7
>
> Best regards,
> --
> Quentin Schulz <quentin.schulz@cherry.de>
>
--
// Casey (she/her)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] cmd: ufetch: only show comma separator if there was a previous feature
2026-05-05 9:14 ` [PATCH v3 2/2] cmd: ufetch: only show comma separator if there was a previous feature Quentin Schulz
@ 2026-05-05 13:58 ` Simon Glass
0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2026-05-05 13:58 UTC (permalink / raw)
To: foss+uboot
Cc: u-boot, Casey Connolly, Tom Rini, Ilias Apalodimas,
Andrew Goodbody, Peter Robinson, Heinrich Schuchardt, Simon Glass,
Quentin Schulz
On 2026-05-05T09:14:31, Quentin Schulz <foss+uboot@0leil.net> wrote:
> cmd: ufetch: only show comma separator if there was a previous feature
>
> Currently, if NET is disabled, the next feature to be printed will start
> with a comma and a space which is not pretty. Add the comma and
> whitespace only when a previous feature has already been shown.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
>
> cmd/ufetch.c | 29 ++++++++++++++++++++---------
> 1 file changed, 20 insertions(+), 9 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n
2026-05-05 9:14 [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n Quentin Schulz
` (2 preceding siblings ...)
2026-05-05 13:47 ` [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n Casey Connolly
@ 2026-05-05 14:14 ` Casey Connolly
3 siblings, 0 replies; 6+ messages in thread
From: Casey Connolly @ 2026-05-05 14:14 UTC (permalink / raw)
To: u-boot, Quentin Schulz
Cc: Tom Rini, Ilias Apalodimas, Andrew Goodbody, Peter Robinson,
Heinrich Schuchardt, Simon Glass, Quentin Schulz
On Tue, 05 May 2026 11:14:30 +0200, Quentin Schulz wrote:
> Make sure the Net feature is printed when NET_LWIP is enabled, not only
> when NET_LEGACY is.
>
> Only print comma and following whitespace as separator if there was a
> feature printed before feature to be printed.
>
>
> [...]
Applied, thanks!
[1/2] cmd: ufetch: show net feature when NET_LWIP is selected
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/b586802913b4
[2/2] cmd: ufetch: only show comma separator if there was a previous feature
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/b61bf7f71dfa
Best regards,
--
// Casey (she/they)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-05 14:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 9:14 [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n Quentin Schulz
2026-05-05 9:14 ` [PATCH v3 1/2] cmd: ufetch: show net feature when NET_LWIP is selected Quentin Schulz
2026-05-05 9:14 ` [PATCH v3 2/2] cmd: ufetch: only show comma separator if there was a previous feature Quentin Schulz
2026-05-05 13:58 ` Simon Glass
2026-05-05 13:47 ` [PATCH v3 0/2] cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n Casey Connolly
2026-05-05 14:14 ` Casey Connolly
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox