summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-08-08 06:46:27 +0000
committerphk <phk@FreeBSD.org>2004-08-08 06:46:27 +0000
commite7ff00372839d76506b62b02f72ffca52e7cccb1 (patch)
tree9f997ef4e73821619ca02a65d59b6d284813d487 /sys/geom/geom.h
parent0a68c3721e19c1768480c812da527b4cdb34e9de (diff)
downloadFreeBSD-src-e7ff00372839d76506b62b02f72ffca52e7cccb1.zip
FreeBSD-src-e7ff00372839d76506b62b02f72ffca52e7cccb1.tar.gz
Give classes a version number and refuse to touch classes which are not
understood. This makes room for additional binary compatibility in the future. Put fields in the class for the geom's methods and initialize the methods of a new geom from these fields. This saves some code in all classes.
Diffstat (limited to 'sys/geom/geom.h')
-rw-r--r--sys/geom/geom.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h
index 82ce8fe..015baea 100644
--- a/sys/geom/geom.h
+++ b/sys/geom/geom.h
@@ -87,6 +87,7 @@ typedef void g_dumpconf_t (struct sbuf *, const char *indent, struct g_geom *,
*/
struct g_class {
const char *name;
+ u_int version;
g_taste_t *taste;
g_config_t *config;
g_ctl_req_t *ctlreq;
@@ -94,12 +95,24 @@ struct g_class {
g_fini_t *fini;
g_ctl_destroy_geom_t *destroy_geom;
/*
+ * Defaults values for geom methods
+ */
+ g_start_t *start;
+ g_spoiled_t *spoiled;
+ g_dumpconf_t *dumpconf;
+ g_access_t *access;
+ g_orphan_t *orphan;
+ g_ioctl_t *ioctl;
+ /*
* The remaining elements are private
*/
LIST_ENTRY(g_class) class;
LIST_HEAD(,g_geom) geom;
};
+#define G_VERSION_00 0x19950323
+#define G_VERSION G_VERSION_00
+
/*
* The g_geom is an instance of a g_class.
*/
OpenPOWER on IntegriCloud