summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2009-02-17 18:24:58 +0000
committermarcel <marcel@FreeBSD.org>2009-02-17 18:24:58 +0000
commitc4ef66ce8f2d9d62b69b1ee07bb38fc7aa231ad1 (patch)
tree28c9a633a5fc15b6a762fa5cdaf24a197d4be3de /sys
parent64b4392c37a50915753adfc142feb441434cf872 (diff)
downloadFreeBSD-src-c4ef66ce8f2d9d62b69b1ee07bb38fc7aa231ad1.zip
FreeBSD-src-c4ef66ce8f2d9d62b69b1ee07bb38fc7aa231ad1.tar.gz
Add a default implementation for pre-check. It should
always succeed if not implemented. Pointy hat: marcel
Diffstat (limited to 'sys')
-rw-r--r--sys/geom/part/g_part_if.m14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/geom/part/g_part_if.m b/sys/geom/part/g_part_if.m
index 4993db1..b9e47f3 100644
--- a/sys/geom/part/g_part_if.m
+++ b/sys/geom/part/g_part_if.m
@@ -1,5 +1,5 @@
#-
-# Copyright (c) 2006-2008 Marcel Moolenaar
+# Copyright (c) 2006-2009 Marcel Moolenaar
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -40,6 +40,16 @@
INTERFACE g_part;
+# Default implementations of methods.
+CODE {
+ static int
+ default_precheck(struct g_part_table *t __unused,
+ enum g_part_ctl r __unused, struct g_part_parms *p __unused)
+ {
+ return (0);
+ }
+};
+
# add() - scheme specific processing for the add verb.
METHOD int add {
struct g_part_table *table;
@@ -106,7 +116,7 @@ METHOD int precheck {
struct g_part_table *table;
enum g_part_ctl req;
struct g_part_parms *gpp;
-};
+} DEFAULT default_precheck;
# probe() - probe the provider attached to the given consumer for the
# existence of the scheme implemented by the G_PART interface handler.
OpenPOWER on IntegriCloud