From c40ad3674c9d2f0709cbe8f2f607633f25c4bb4b Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 11 Jan 2008 11:41:15 +0100 Subject: [PATCH] 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" --- lib/blkid/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.8.3.1