[PATCH v3 2/2] cmd/part.c: implement "part name" subcommand

Quentin Schulz quentin.schulz at cherry.de
Tue Nov 11 18:27:13 CET 2025


Hi Rasmus,

On 11/11/25 9:00 AM, Rasmus Villemoes wrote:
> On Tue, Nov 11 2025, Anshul Dalal <anshuld at ti.com> wrote:
> 
>>>   static int do_part_set(int argc, char *const argv[])
>>>   {
>>>   	const char *devname, *partstr, *typestr;
>>> @@ -273,6 +282,8 @@ static int do_part(struct cmd_tbl *cmdtp, int flag, int argc,
>>>   		return do_part_size(argc - 2, argv + 2);
>>>   	else if (!strcmp(argv[1], "number"))
>>>   		return do_part_number(argc - 2, argv + 2);
>>> +	else if (!strcmp(argv[1], "name"))
>>> +		return do_part_name(argc - 2, argv + 2);
>>>   	else if (!strcmp(argv[1], "types"))
>>>   		return do_part_types(argc - 2, argv + 2);
>>>   	else if (!strcmp(argv[1], "set"))
>>> @@ -305,6 +316,9 @@ 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"
>>> +	"part name <interface> <dev> <part> <varname>\n"
>>
>> Nit: Shouldn't this be part name <interface> <dev> <part> [varname]
>> instead?
>>
> 
> Yes, probably, I did notice that, but I preferred being consistent with
> the existing cases which also do not indicate varname as optional.
> 

Let's not be consistent with a mistake if it can be fixed without 
breaking compatibility. From what I gathered, it's a simple help text 
(and maybe doc) update, so i think it's better to fix it.

Cheers,
Quentin


More information about the U-Boot mailing list