OSDN Git Service

Merge "blkid: Resolve to the exFAT uuid change on reboot." am: 6eac3894a6 am: 68acc00...
authorJeff Sharkey <jsharkey@android.com>
Mon, 10 Jul 2017 19:55:58 +0000 (19:55 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Mon, 10 Jul 2017 19:55:58 +0000 (19:55 +0000)
am: 9abc85f05b

Change-Id: Iaf63db082453bebed08e364abe9c657bad7d4a41

lib/blkid/probe.c

index fae74a7..3bcf4c3 100644 (file)
@@ -1473,6 +1473,7 @@ static int probe_exfat(struct blkid_probe *probe, struct blkid_magic *id,
     struct exfat_super_block *sb;
     struct exfat_entry_label *label;
     uuid_t uuid;
+
     sb = (struct exfat_super_block *)buf;
     if (!sb || !CLUSTER_SIZE(sb)) {
         DBG(DEBUG_PROBE, printf("bad exfat superblock.\n"));
@@ -1486,11 +1487,11 @@ static int probe_exfat(struct blkid_probe *probe, struct blkid_magic *id,
         blkid_set_tag(probe->dev, "LABEL", "disk", 4);
     }
 
+    memset(uuid, 0, sizeof (uuid));
     snprintf(uuid, sizeof (uuid), "%02hhX%02hhX-%02hhX%02hhX",
              sb->volume_serial[3], sb->volume_serial[2],
              sb->volume_serial[1], sb->volume_serial[0]);
-
-    set_uuid(probe->dev, uuid, 0);
+    blkid_set_tag(probe->dev, "UUID", uuid, strlen(uuid));
 
     return 0;
 }