Message ID | 20241004171340.v2.1.I938c91d10e454e841fdf5d64499a8ae8514dc004@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] block: add partition uuid into uevent as "PARTUUID" | expand |
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
On Fri, 04 Oct 2024 17:13:43 -0700, Douglas Anderson wrote: > Both most common formats have uuid in addition to partition name: > GPT: standard uuid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > DOS: 4 byte disk signature and 1 byte partition xxxxxxxx-xx > > Tools from util-linux use the same notation for them. > > > [...] Applied, thanks! [1/1] block: add partition uuid into uevent as "PARTUUID" commit: 74f4a8dc0dd8bf337edacb693383911b856f61e3 Best regards,
diff --git a/block/partitions/core.c b/block/partitions/core.c index 5bd7a603092e..aa54c1f4eaa5 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -253,6 +253,8 @@ static int part_uevent(const struct device *dev, struct kobj_uevent_env *env) add_uevent_var(env, "PARTN=%u", bdev_partno(part)); if (part->bd_meta_info && part->bd_meta_info->volname[0]) add_uevent_var(env, "PARTNAME=%s", part->bd_meta_info->volname); + if (part->bd_meta_info && part->bd_meta_info->uuid[0]) + add_uevent_var(env, "PARTUUID=%s", part->bd_meta_info->uuid); return 0; }