public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libblkid: add PARTTYPE tag
@ 2014-01-14 21:19 Michael Marineau
  2014-01-14 21:19 ` [PATCH 2/2] lsblk: " Michael Marineau
  2014-02-10  9:57 ` [PATCH 1/2] libblkid: " Karel Zak
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Marineau @ 2014-01-14 21:19 UTC (permalink / raw)
  To: util-linux; +Cc: Michael Marineau

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-10 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 21:19 [PATCH 1/2] libblkid: add PARTTYPE tag Michael Marineau
2014-01-14 21:19 ` [PATCH 2/2] lsblk: " Michael Marineau
2014-02-10  9:49   ` Karel Zak
2014-02-10  9:57 ` [PATCH 1/2] libblkid: " Karel Zak
2014-02-10 21:54   ` Michael Marineau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox