summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2012-02-15 10:02:19 +0000
committerae <ae@FreeBSD.org>2012-02-15 10:02:19 +0000
commit3ccaf222af3ec8dad5ef5cdacc4ebec882f47e11 (patch)
treee30fce692b3a8556d441aac3b4ca145560d01f70 /sys/geom
parentf57f409fc3f43eab95a13603b04a5988c2a00bb2 (diff)
downloadFreeBSD-src-3ccaf222af3ec8dad5ef5cdacc4ebec882f47e11.zip
FreeBSD-src-3ccaf222af3ec8dad5ef5cdacc4ebec882f47e11.tar.gz
Add PART::type attribute handler. It returns partition type as string.
MFC after: 2 weeks
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/part/g_part.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index d422abf..b183e14 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -2057,6 +2057,7 @@ g_part_start(struct bio *bp)
struct g_part_table *table;
struct g_kerneldump *gkd;
struct g_provider *pp;
+ char buf[64];
pp = bp->bio_to;
gp = pp->geom;
@@ -2105,6 +2106,9 @@ g_part_start(struct bio *bp)
if (g_handleattr_str(bp, "PART::scheme",
table->gpt_scheme->name))
return;
+ if (g_handleattr_str(bp, "PART::type",
+ G_PART_TYPE(table, entry, buf, sizeof(buf))))
+ return;
if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) {
/*
* Check that the partition is suitable for kernel
OpenPOWER on IntegriCloud