* [PATCH] block: add partition uuid into uevent as "PARTUUID"
@ 2017-10-06 11:42 Konstantin Khlebnikov
2017-10-10 20:57 ` Kyle Fortin
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khlebnikov @ 2017-10-06 11:42 UTC (permalink / raw)
To: linux-block, Jens Axboe, linux-kernel
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.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
block/partition-generic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/partition-generic.c b/block/partition-generic.c
index 88c555db4e5d..8f8b580aee16 100644
--- a/block/partition-generic.c
+++ b/block/partition-generic.c
@@ -226,6 +226,8 @@ static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
add_uevent_var(env, "PARTN=%u", part->partno);
if (part->info && part->info->volname[0])
add_uevent_var(env, "PARTNAME=%s", part->info->volname);
+ if (part->info && part->info->uuid[0])
+ add_uevent_var(env, "PARTUUID=%s", part->info->uuid);
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block: add partition uuid into uevent as "PARTUUID"
2017-10-06 11:42 [PATCH] block: add partition uuid into uevent as "PARTUUID" Konstantin Khlebnikov
@ 2017-10-10 20:57 ` Kyle Fortin
0 siblings, 0 replies; 2+ messages in thread
From: Kyle Fortin @ 2017-10-10 20:57 UTC (permalink / raw)
To: Konstantin Khlebnikov; +Cc: linux-block, Jens Axboe, linux-kernel
Hi Konstantin,
> On Oct 6, 2017, at 7:42 AM, Konstantin Khlebnikov =
<khlebnikov@yandex-team.ru> wrote:
>=20
> 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
>=20
> Tools from util-linux use the same notation for them.
>=20
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> ---
> block/partition-generic.c | 2 ++
> 1 file changed, 2 insertions(+)
>=20
> diff --git a/block/partition-generic.c b/block/partition-generic.c
> index 88c555db4e5d..8f8b580aee16 100644
> --- a/block/partition-generic.c
> +++ b/block/partition-generic.c
> @@ -226,6 +226,8 @@ static int part_uevent(struct device *dev, struct =
kobj_uevent_env *env)
> add_uevent_var(env, "PARTN=3D%u", part->partno);
> if (part->info && part->info->volname[0])
> add_uevent_var(env, "PARTNAME=3D%s", =
part->info->volname);
> + if (part->info && part->info->uuid[0])
> + add_uevent_var(env, "PARTUUID=3D%s", part->info->uuid);
> return 0;
> }
Looks fine.
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-10 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06 11:42 [PATCH] block: add partition uuid into uevent as "PARTUUID" Konstantin Khlebnikov
2017-10-10 20:57 ` Kyle Fortin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox