@@ -176,7 +176,8 @@ static const char *get_uuid_blkdev(char *path)
blkid_tag_iterate iter;
blkid_dev dev;
const char *type;
- const char *val = NULL;
+ const char *val;
+ const char *uuid_val = NULL;
if (cache == NULL)
blkid_get_cache(&cache, NULL);
@@ -193,11 +194,16 @@ static const char *get_uuid_blkdev(char *path)
iter = blkid_tag_iterate_begin(dev);
if (!iter)
return NULL;
- while (blkid_tag_next(iter, &type, &val) == 0)
+ while (blkid_tag_next(iter, &type, &val) == 0) {
if (strcmp(type, "UUID") == 0)
+ uuid_val = val;
+ if (strcmp(type, "TYPE") == 0 &&
+ strcmp(val, "btrfs") == 0) {
+ uuid_val = NULL;
break;
+ }
blkid_tag_iterate_end(iter);
- return val;
+ return uuid_val;
}
#else
#define get_uuid_blkdev(path) (NULL)