[PATCH] cmd: part: Cover both part type entries with GUID ifdef

Marek Vasut marek.vasut+renesas at mailbox.org
Sun Dec 10 22:25:07 CET 2023


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 at mailbox.org>
---
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
---
 cmd/part.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



More information about the U-Boot mailing list