From: Brian Swetland Date: Fri, 4 Feb 2011 21:19:10 +0000 (-0800) Subject: block: genhd: Add partition name to the partition info uevent callback X-Git-Tag: firefly_0821_release~7613^2~672 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ec3e26868a693dd732e6badfe935d03688ec7314;p=firefly-linux-kernel-4.4.55.git block: genhd: Add partition name to the partition info uevent callback For disk and partition devices, add new uevent parameter: PARTNAME specifices the partition name of a partition device Signed-off-by: Dima Zavin --- diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 467ac4bcc9d1..a0a041dfa0fd 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -371,6 +371,8 @@ static int part_uevent(struct device *dev, struct kobj_uevent_env *env) struct hd_struct *part = dev_to_part(dev); add_uevent_var(env, "PARTN=%u", part->partno); + if (part->info && part->info->volname[0]) + add_uevent_var(env, "PARTNAME=%s", part->info->volname); return 0; }