summaryrefslogtreecommitdiffstats
path: root/sys/geom/part
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2011-02-25 10:24:35 +0000
committernetchild <netchild@FreeBSD.org>2011-02-25 10:24:35 +0000
commit6bf702a55bf6e540929bc37a97ba26e51394a94c (patch)
tree9d3d4c4ac744558b0f121bc95130f956f192c80f /sys/geom/part
parentcc4128c6b1ffcb09a70e70959874cc2bb6e81d0e (diff)
downloadFreeBSD-src-6bf702a55bf6e540929bc37a97ba26e51394a94c.zip
FreeBSD-src-6bf702a55bf6e540929bc37a97ba26e51394a94c.tar.gz
Add some FEATURE macros for various GEOM classes.
No FreeBSD version bump, the userland application to query the features will be committed last and can serve as an indication of the availablility if needed. Sponsored by: Google Summer of Code 2010 Submitted by: kibab Reviewed by: silence on geom@ during 2 weeks X-MFC after: to be determined in last commit with code from this project
Diffstat (limited to 'sys/geom/part')
-rw-r--r--sys/geom/part/g_part_apm.c3
-rw-r--r--sys/geom/part/g_part_bsd.c3
-rw-r--r--sys/geom/part/g_part_ebr.c8
-rw-r--r--sys/geom/part/g_part_gpt.c3
-rw-r--r--sys/geom/part/g_part_mbr.c3
-rw-r--r--sys/geom/part/g_part_pc98.c3
-rw-r--r--sys/geom/part/g_part_vtoc8.c3
7 files changed, 26 insertions, 0 deletions
diff --git a/sys/geom/part/g_part_apm.c b/sys/geom/part/g_part_apm.c
index c73d7f6..1a1a3bd 100644
--- a/sys/geom/part/g_part_apm.c
+++ b/sys/geom/part/g_part_apm.c
@@ -41,11 +41,14 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/systm.h>
+#include <sys/sysctl.h>
#include <geom/geom.h>
#include <geom/part/g_part.h>
#include "g_part_if.h"
+FEATURE(geom_part_apm, "GEOM partitioning class for Apple-style partitions");
+
struct g_part_apm_table {
struct g_part_table base;
struct apm_ddr ddr;
diff --git a/sys/geom/part/g_part_bsd.c b/sys/geom/part/g_part_bsd.c
index e51a22f..61fe89a 100644
--- a/sys/geom/part/g_part_bsd.c
+++ b/sys/geom/part/g_part_bsd.c
@@ -40,11 +40,14 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/systm.h>
+#include <sys/sysctl.h>
#include <geom/geom.h>
#include <geom/part/g_part.h>
#include "g_part_if.h"
+FEATURE(geom_part_bsd, "GEOM partitioning class for BSD disklabels");
+
struct g_part_bsd_table {
struct g_part_table base;
u_char *bbarea;
diff --git a/sys/geom/part/g_part_ebr.c b/sys/geom/part/g_part_ebr.c
index 7bf0c55..5f665ca 100644
--- a/sys/geom/part/g_part_ebr.c
+++ b/sys/geom/part/g_part_ebr.c
@@ -42,11 +42,19 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/systm.h>
+#include <sys/sysctl.h>
#include <geom/geom.h>
#include <geom/part/g_part.h>
#include "g_part_if.h"
+FEATURE(geom_part_ebr,
+ "GEOM partitioning class for extended boot records support");
+#if defined(GEOM_PART_EBR_COMPAT)
+FEATURE(geom_part_ebr_compat,
+ "GEOM EBR partitioning class: backward-compatible partition names");
+#endif
+
#define EBRSIZE 512
struct g_part_ebr_table {
diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c
index d0896b8..9e897a4 100644
--- a/sys/geom/part/g_part_gpt.c
+++ b/sys/geom/part/g_part_gpt.c
@@ -41,12 +41,15 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/systm.h>
+#include <sys/sysctl.h>
#include <sys/uuid.h>
#include <geom/geom.h>
#include <geom/part/g_part.h>
#include "g_part_if.h"
+FEATURE(geom_part_gpt, "GEOM partitioning class for GPT partitions support");
+
CTASSERT(offsetof(struct gpt_hdr, padding) == 92);
CTASSERT(sizeof(struct gpt_ent) == 128);
diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c
index c39c92f..63b7e64 100644
--- a/sys/geom/part/g_part_mbr.c
+++ b/sys/geom/part/g_part_mbr.c
@@ -40,11 +40,14 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/systm.h>
+#include <sys/sysctl.h>
#include <geom/geom.h>
#include <geom/part/g_part.h>
#include "g_part_if.h"
+FEATURE(geom_part_mbr, "GEOM partitioning class for MBR support");
+
#define MBRSIZE 512
struct g_part_mbr_table {
diff --git a/sys/geom/part/g_part_pc98.c b/sys/geom/part/g_part_pc98.c
index e7b3341..d8aa87d 100644
--- a/sys/geom/part/g_part_pc98.c
+++ b/sys/geom/part/g_part_pc98.c
@@ -40,11 +40,14 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/systm.h>
+#include <sys/sysctl.h>
#include <geom/geom.h>
#include <geom/part/g_part.h>
#include "g_part_if.h"
+FEATURE(geom_part_pc98, "GEOM partitioning class for PC-9800 disk partitions");
+
#define SECSIZE 512
#define MENUSIZE 7168
#define BOOTSIZE 8192
diff --git a/sys/geom/part/g_part_vtoc8.c b/sys/geom/part/g_part_vtoc8.c
index d22c5b1..e59c8e4 100644
--- a/sys/geom/part/g_part_vtoc8.c
+++ b/sys/geom/part/g_part_vtoc8.c
@@ -39,12 +39,15 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/systm.h>
+#include <sys/sysctl.h>
#include <sys/vtoc.h>
#include <geom/geom.h>
#include <geom/part/g_part.h>
#include "g_part_if.h"
+FEATURE(geom_part_vtoc8, "GEOM partitioning class for SMI VTOC8 disk labels");
+
struct g_part_vtoc8_table {
struct g_part_table base;
struct vtoc8 vtoc;
OpenPOWER on IntegriCloud