diff options
| author | Tom Rini <[email protected]> | 2023-01-19 09:41:54 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-01-19 09:41:54 -0500 |
| commit | 7aec35be4b5fa7aabc0ece03dc8825495d86a1be (patch) | |
| tree | 483d9f85e8184cb91f00e3345391bff13eee580a /cmd | |
| parent | 5b958dea5c678dbdb2aeb6ac3c0c8cc8dfea065c (diff) | |
| parent | ace75d642fa71034b248cde30709c79e06c52d61 (diff) | |
Merge branch '2022-01-18-assorted-updates'
- A few TI platform fixes, compression test cleanup and zstd update,
npcm7xx update, add "part type" subcommand, VBE bugfix on some
platforms, cleanup EVENT related Kconfig option logic (and fix some
platforms), other minor cleanups.
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/Kconfig | 1 | ||||
| -rw-r--r-- | cmd/event.c | 2 | ||||
| -rw-r--r-- | cmd/part.c | 35 |
3 files changed, 37 insertions, 1 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index b2aefae9cb7..4fe2c75de25 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2622,6 +2622,7 @@ config CMD_DIAG config CMD_EVENT bool "event - Show information about events" + depends on EVENT default y if EVENT_DEBUG help This enables the 'event' command which provides information about diff --git a/cmd/event.c b/cmd/event.c index 9cac2023530..b4b779ffac0 100644 --- a/cmd/event.c +++ b/cmd/event.c @@ -20,7 +20,7 @@ static int do_event_list(struct cmd_tbl *cmdtp, int flag, int argc, #ifdef CONFIG_SYS_LONGHELP static char event_help_text[] = - "event list - list event spies"; + "list - list event spies"; #endif U_BOOT_CMD_WITH_SUBCMDS(event, "Events", event_help_text, diff --git a/cmd/part.c b/cmd/part.c index 9d419c967cb..28f2b7ff9bb 100644 --- a/cmd/part.c +++ b/cmd/part.c @@ -182,6 +182,31 @@ static int do_part_number(int argc, char *const argv[]) return do_part_info(argc, argv, CMD_PART_INFO_NUMBER); } +#ifdef CONFIG_PARTITION_TYPE_GUID +static int do_part_type(int argc, char *const argv[]) +{ + int part; + struct blk_desc *dev_desc; + struct disk_partition info; + + if (argc < 2) + return CMD_RET_USAGE; + if (argc > 3) + return CMD_RET_USAGE; + + part = blk_get_device_part_str(argv[0], argv[1], &dev_desc, &info, 0); + if (part < 0) + return 1; + + if (argc > 2) + env_set(argv[2], info.type_guid); + else + printf("%s\n", info.type_guid); + + return 0; +} +#endif + static int do_part_types(int argc, char * const argv[]) { struct part_driver *drv = ll_entry_start(struct part_driver, @@ -220,6 +245,10 @@ static int do_part(struct cmd_tbl *cmdtp, int flag, int argc, return do_part_number(argc - 2, argv + 2); else if (!strcmp(argv[1], "types")) return do_part_types(argc - 2, argv + 2); +#ifdef CONFIG_PARTITION_TYPE_GUID + else if (!strcmp(argv[1], "type")) + return do_part_type(argc - 2, argv + 2); +#endif return CMD_RET_USAGE; } @@ -244,6 +273,12 @@ U_BOOT_CMD( "part number <interface> <dev> <part> <varname>\n" " - set environment variable to the partition number using the partition name\n" " part must be specified as partition name\n" +#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" "part types\n" " - list supported partition table types" ); |
