aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2005-09-18 23:54:40 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2005-09-18 23:54:40 +0000
commit40fcaded53daea81cc6f5a1136e2bc382dc51bab (patch)
treecd2d86533a2e890193090d216cbc185d540ed44c /sys
parent73130b2224f00c6e7e7d514abbe8808aa4d5f549 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/geom/geom_ctl.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c
index e67d84bb58e30..8186bc71e20b8 100644
--- a/sys/geom/geom_ctl.c
+++ b/sys/geom/geom_ctl.c
@@ -371,7 +371,6 @@ gctl_get_class(struct gctl_req *req, char const *arg)
if (!strcmp(p, cp->name))
return (cp);
}
- gctl_error(req, "Class not found");
return (NULL);
}
@@ -427,11 +426,16 @@ g_ctl_req(void *arg, int flag __unused)
gctl_error(req, "Class not found");
return;
}
- verb = gctl_get_param(req, "verb", NULL);
- if (mp->ctlreq == NULL)
+ if (mp->ctlreq == NULL) {
gctl_error(req, "Class takes no requests");
- else
- mp->ctlreq(req, mp, verb);
+ return;
+ }
+ verb = gctl_get_param(req, "verb", NULL);
+ if (verb == NULL) {
+ gctl_error(req, "Verb missing");
+ return;
+ }
+ mp->ctlreq(req, mp, verb);
g_topology_assert();
}