From: Michael Marineau <michael.marineau@coreos.com>
To: util-linux@vger.kernel.org
Cc: Michael Marineau <michael.marineau@coreos.com>
Subject: [PATCH 1/2] libblkid: add PARTTYPE tag
Date: Tue, 14 Jan 2014 13:19:49 -0800 [thread overview]
Message-ID: <1389734390-32485-1-git-send-email-michael.marineau@coreos.com> (raw)
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
next reply other threads:[~2014-01-14 21:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 21:19 Michael Marineau [this message]
2014-01-14 21:19 ` [PATCH 2/2] lsblk: add PARTTYPE tag 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389734390-32485-1-git-send-email-michael.marineau@coreos.com \
--to=michael.marineau@coreos.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox