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 <dima@android.com>
This commit is contained in:
committed by
Colin Cross
parent
082fec5ea3
commit
ec3e26868a
@@ -371,6 +371,8 @@ static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|||||||
struct hd_struct *part = dev_to_part(dev);
|
struct hd_struct *part = dev_to_part(dev);
|
||||||
|
|
||||||
add_uevent_var(env, "PARTN=%u", part->partno);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user