summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r--sys/geom/geom_subr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index b9c6236..1bc2ced 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -640,3 +640,16 @@ g_insert_geom(char *class, struct g_consumer *cp)
return (gp);
}
+int
+g_getattr__(const char *attr, struct g_consumer *cp, void *var, int len)
+{
+ int error, i;
+
+ i = len;
+ error = g_io_getattr(attr, cp, &i, var);
+ if (error)
+ return (error);
+ if (i != len)
+ return (EINVAL);
+ return (0);
+}
OpenPOWER on IntegriCloud