+2007-05-18 Theodore Tso <tytso@mit.edu>
+
+ * tag.c (blkid_set_tag): Fix bug where bid_type, bid_label, and
+ bid_uuid could get corrupted if their corresponding tag is
+ set to its original value using blkid_set_tag().
+
2007-05-17 Theodore Tso <tytso@mit.edu>
* cache.c (blkid_gc_cache): New function which removes any devices
if (!(val = blkid_strndup(value, vlength)) && value)
return -BLKID_ERR_MEM;
- /* Link common tags directly to the device struct */
- if (!strcmp(name, "TYPE"))
- dev->bid_type = val;
- else if (!strcmp(name, "LABEL"))
- dev->bid_label = val;
- else if (!strcmp(name, "UUID"))
- dev->bid_uuid = val;
-
t = blkid_find_tag_dev(dev, name);
if (!value) {
if (t)
}
}
+ /* Link common tags directly to the device struct */
+ if (!strcmp(name, "TYPE"))
+ dev->bid_type = val;
+ else if (!strcmp(name, "LABEL"))
+ dev->bid_label = val;
+ else if (!strcmp(name, "UUID"))
+ dev->bid_uuid = val;
+
if (dev->bid_cache)
dev->bid_cache->bic_flags |= BLKID_BIC_FL_CHANGED;
return 0;