making `blkid -lt NAME=value -o device` equivalent to `findfs` for PART{UUID,LABEL}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In commit c48508c2, findfs was given ability to work with PARTUUID and
PARTLABEL. It works on all four types with blkid_evaluate_tag().

When blkid is run in form of `blkid -lt NAME=value -o device` for UUID
and LABEL, it works the same way as findfs:

    /* convert LABEL/UUID lookup to evaluate request */
    if (lookup && output_format == OUTPUT_DEVICE_ONLY && search_type &&
        (!strcmp(search_type, "LABEL") || !strcmp(search_type, "UUID"))) {
        eval++;
        lookup = 0;
    }

but not always for PARTUUID and PARTLABEL.

Would it be a good idea to add them in the test as well, so that
`findfs` can be considered an equivalence/shortcut as blkid in that
form?

[tom@localhost ~]$ blkid -t PARTLABEL="EFI System" -o device
/dev/sda1
/dev/sdb1
[tom@localhost ~]$ blkid -t LABEL=TEST -o device
/dev/sda1
/dev/sdb1
[tom@localhost ~]$ blkid -lt PARTLABEL="EFI System" -o device
/dev/sda1
[tom@localhost ~]$ findfs PARTLABEL="EFI System"
/dev/sdb1
[tom@localhost ~]$ blkid -lt LABEL=TEST -o device
/dev/sdb1
[tom@localhost ~]$ findfs LABEL=TEST
/dev/sdb1
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux