search for: blkid_sublks_label

Displaying 1 result from an estimated 1 matches for "blkid_sublks_label".

2012 Feb 14
1
[PATCH RFC] blkid: start using libblkid directly instead
...reply_with_perror ("strdup"); - return out; - } + blkprobe = blkid_new_probe (); + if (!blkprobe) + goto done; + if (blkid_probe_set_device (blkprobe, fd, 0, 0)) + goto done; + + blkid_probe_enable_superblocks(blkprobe, 1); + + blkid_probe_set_superblocks_flags (blkprobe, BLKID_SUBLKS_LABEL | + BLKID_SUBLKS_UUID | BLKID_SUBLKS_TYPE); - /* Trim trailing \n if present. */ - size_t len = strlen (out); - if (len > 0 && out[len-1] == '\n') - out[len-1] = '\0'; + rc = blkid_do_safeprobe (blkprobe); + if (!rc) + blki...