[PATCH] cmd/part.c: implement "part name" subcommand
Quentin Schulz
quentin.schulz at cherry.de
Thu Oct 16 15:28:25 CEST 2025
Hi Rasmus,
On 10/16/25 2:52 PM, Rasmus Villemoes wrote:
> This is a natural buddy to the existing "part number", allowing one to
> get the partition name for a given partition number.
>
Can you update the documentation in doc/usage/cmd/part.rst as well?
> Signed-off-by: Rasmus Villemoes <ravi at prevas.dk>
> ---
> cmd/part.c | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/cmd/part.c b/cmd/part.c
> index db7bc5819c0..975a0a08a99 100644
> --- a/cmd/part.c
> +++ b/cmd/part.c
> @@ -25,7 +25,8 @@
> enum cmd_part_info {
> CMD_PART_INFO_START = 0,
> CMD_PART_INFO_SIZE,
> - CMD_PART_INFO_NUMBER
> + CMD_PART_INFO_NUMBER,
> + CMD_PART_INFO_NAME,
> };
>
> static int do_part_uuid(int argc, char *const argv[])
> @@ -154,6 +155,9 @@ static int do_part_info(int argc, char *const argv[], enum cmd_part_info param)
> case CMD_PART_INFO_NUMBER:
> snprintf(buf, sizeof(buf), "0x%x", part);
> break;
> + case CMD_PART_INFO_NAME:
> + snprintf(buf, sizeof(buf), "%s", info.name);
Is it possible info.name is never set by the fs/blk driver? Should we
initialize this field?
Cheers,
Quentin
More information about the U-Boot
mailing list