Skip to content

'part name' subcommand and some robustification

Rasmus Villemoes u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 7 repliesIn review
  2. v22 patches 8 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2disk/part.c: ensure strings in struct disk_partition are valid after successful get_infocmd/gpt.c disk/part.c include/part.h+55 -282 replies
2/2cmd/part.c: implement "part name" subcommandcmd/part.c doc/usage/cmd/part.rst+28 -13 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchQuentin SchulzAnshul Dalal
SeriesT-b
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] 'part name' subcommand and some robustification

Implement a "part name" subcommand, mirroring the existing "part number" subcommand.

In the discussion for v1 of that, it came up that there's a bit of inconsistency in how much and what one can assume to be initialized in 'struct disk_partition' after a successful call of one of the get_info* family of functions. Patch 1/2 tries to consolidate that by making sure all ->get_info invocations go through a common helper that at least always initializes the string members.

Quentin, I've taken the liberty of including your Acks, as the incremental diff in patch 1 is quite minor, but do speak up if I should not have done that.

v3: Make sure part_get_type_by_name() can only ever return 0, -ENOSYS (in case ->get_info is not implemented) and -ENOENT, rather than anything that ->get_info might return.

v2: https://lore.kernel.org/u-boot/[email protected]/

Rasmus Villemoes (2):
disk/part.c: ensure strings in struct disk_partition are valid after
successful get_info
cmd/part.c: implement "part name" subcommand

 cmd/gpt.c              |  4 +--
 cmd/part.c             | 16 ++++++++++-
 disk/part.c            | 63 +++++++++++++++++++++++++-----------------
 doc/usage/cmd/part.rst | 13 +++++++++
 include/part.h         | 16 +++++++++++
 5 files changed, 83 insertions(+), 29 deletions(-)
Signature · 1 line
2.51.0