search for: blkid_tag_next

Displaying 2 results from an estimated 2 matches for "blkid_tag_next".

2010 Jun 17
4
[PATCH] Improve support for exporting btrfs subvolumes.
...lkid_dev dev; const char *type; - const char *val = NULL; + const char *val, *uuid = NULL; if (cache == NULL) blkid_get_cache(&cache, NULL); @@ -193,42 +196,29 @@ 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; + if (strcmp(type, "TYPE") == 0 && + strcmp(val, "btrfs") == 0) { + uuid = NULL; break; + } + } blkid_ta...
2010 Jun 02
2
NFS exporting btrfs subvolumes.
...onst 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...