svn commit: r231751 - head/sys/geom/part
Andrey V. Elsukov
ae at FreeBSD.org
Wed Feb 15 10:02:20 UTC 2012
Author: ae
Date: Wed Feb 15 10:02:19 2012
New Revision: 231751
URL: http://svn.freebsd.org/changeset/base/231751
Log:
Add PART::type attribute handler. It returns partition type as string.
MFC after: 2 weeks
Modified:
head/sys/geom/part/g_part.c
Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c Wed Feb 15 09:53:20 2012 (r231750)
+++ head/sys/geom/part/g_part.c Wed Feb 15 10:02:19 2012 (r231751)
@@ -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
More information about the svn-src-all
mailing list