diff mbox series

cmd: part: Cover both part type entries with GUID ifdef

Message ID 20231210212522.398132-1-marek.vasut+renesas@mailbox.org
State Accepted
Commit 97135d9f4220e54b38f69a3f2416b2fd9d8f378c
Delegated to: Tom Rini
Headers show
Series cmd: part: Cover both part type entries with GUID ifdef | expand

Commit Message

Marek Vasut Dec. 10, 2023, 9:25 p.m. UTC
The 'part type' subcommand depends on GUID partition table support.
The help text exposes one of two 'part type' subcommand entries,
hide both in case GUID partition table support is not enabled to
avoid confusing users.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
---
 cmd/part.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Dec. 13, 2023, 7:50 p.m. UTC | #1
On Sun, 10 Dec 2023 at 14:25, Marek Vasut
<marek.vasut+renesas@mailbox.org> wrote:
>
> The 'part type' subcommand depends on GUID partition table support.
> The help text exposes one of two 'part type' subcommand entries,
> hide both in case GUID partition table support is not enabled to
> avoid confusing users.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> ---
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  cmd/part.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Dec. 20, 2023, 9:02 p.m. UTC | #2
On Sun, Dec 10, 2023 at 10:25:07PM +0100, Marek Vasut wrote:

> The 'part type' subcommand depends on GUID partition table support.
> The help text exposes one of two 'part type' subcommand entries,
> hide both in case GUID partition table support is not enabled to
> avoid confusing users.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/next, thanks!
diff mbox series

Patch

diff --git a/cmd/part.c b/cmd/part.c
index 0ce190005d3..c75f85acd52 100644
--- a/cmd/part.c
+++ b/cmd/part.c
@@ -308,9 +308,9 @@  U_BOOT_CMD(
 #ifdef CONFIG_PARTITION_TYPE_GUID
 	"part type <interface> <dev>:<part>\n"
 	"    - print partition type\n"
-#endif
 	"part type <interface> <dev>:<part> <varname>\n"
 	"    - set environment variable to partition type\n"
+#endif
 	"part set <interface> <dev> type\n"
 	"    - set partition type for a device\n"
 	"part types\n"