From: Pixel Date: Fri, 11 Jan 2008 10:41:15 +0000 (+0100) Subject: blkid: have ntfs's UUID compatible with vol_id X-Git-Tag: v1.40.5~22 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c40ad3674c9d2f0709cbe8f2f607633f25c4bb4b;p=tools%2Fe2fsprogs.git blkid: have ntfs's UUID compatible with vol_id Ensure the length of the UUID is always the same without the patch: % blkid /tmp/a /tmp/b /tmp/a: UUID="7130E4771519577F" TYPE="ntfs" /tmp/b: UUID="7E9B4A7CCE99CA" TYPE="ntfs" with the patch: % blkid /tmp/a /tmp/b /tmp/a: UUID="7130E4771519577F" TYPE="ntfs" /tmp/b: UUID="007E9B4A7CCE99CA" TYPE="ntfs" ie same as: % vol_id --uuid /tmp/a ; vol_id --uuid /tmp/b 7130E4771519577F 007E9B4A7CCE99CA Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c index 4c72a56..32d9f3f 100644 --- a/lib/blkid/probe.c +++ b/lib/blkid/probe.c @@ -500,7 +500,7 @@ static int probe_ntfs(struct blkid_probe *probe, } } - sprintf(uuid_str, "%llX", blkid_le64(ns->volume_serial)); + sprintf(uuid_str, "%016llX", blkid_le64(ns->volume_serial)); blkid_set_tag(probe->dev, "UUID", uuid_str, 0); if (label_str[0]) blkid_set_tag(probe->dev, "LABEL", label_str, 0);