[PATCH 1/2] libblkid: add PARTTYPE tag

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

 



Add PARTTYPE to make searching for devices partition possible without
dropping to the low-level probe API and searching all devices by
PART_ENTRY_TYPE. For example to find any 'EFI System Partition' devices:

$ blkid -t PARTTYPE=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
---
 libblkid/src/verify.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c
index 1c0ca0f..eac613e 100644
--- a/libblkid/src/verify.c
+++ b/libblkid/src/verify.c
@@ -38,6 +38,8 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev)
 				blkid_set_tag(dev, "PARTUUID", data, len);
 			else if (strcmp(name, "PART_ENTRY_NAME") == 0)
 				blkid_set_tag(dev, "PARTLABEL", data, len);
+			else if (strcmp(name, "PART_ENTRY_TYPE") == 0)
+				blkid_set_tag(dev, "PARTTYPE", data, len);
 
 		} else if (!strstr(name, "_ID")) {
 			/* superblock UUID, LABEL, ...
-- 
1.8.3.2

--
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