Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177564816
D25738.1794746183.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D25738.1794746183.diff
View Options
Index: head/sys/geom/geom_ctl.c
===================================================================
--- head/sys/geom/geom_ctl.c
+++ head/sys/geom/geom_ctl.c
@@ -396,12 +396,15 @@
struct g_class *cp;
p = gctl_get_asciiparam(req, arg);
- if (p == NULL)
+ if (p == NULL) {
+ gctl_error(req, "Missing %s argument", arg);
return (NULL);
+ }
LIST_FOREACH(cp, &g_classes, class) {
if (!strcmp(p, cp->name))
return (cp);
}
+ gctl_error(req, "Class not found: \"%s\"", p);
return (NULL);
}
@@ -413,8 +416,10 @@
struct g_geom *gp;
p = gctl_get_asciiparam(req, arg);
- if (p == NULL)
+ if (p == NULL) {
+ gctl_error(req, "Missing %s argument", arg);
return (NULL);
+ }
LIST_FOREACH(mp, &g_classes, class) {
if (mpr != NULL && mpr != mp)
continue;
@@ -434,8 +439,10 @@
struct g_provider *pp;
p = gctl_get_asciiparam(req, arg);
- if (p == NULL)
+ if (p == NULL) {
+ gctl_error(req, "Missing '%s' argument", arg);
return (NULL);
+ }
pp = g_provider_by_name(p);
if (pp != NULL)
return (pp);
@@ -453,10 +460,8 @@
g_topology_assert();
req = arg;
mp = gctl_get_class(req, "class");
- if (mp == NULL) {
- gctl_error(req, "Class not found");
+ if (mp == NULL)
return;
- }
if (mp->ctlreq == NULL) {
gctl_error(req, "Class takes no requests");
return;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 12:36 PM (12 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41742790
Default Alt Text
D25738.1794746183.diff (1 KB)
Attached To
Mode
D25738: gctl_get_class, gctl_get_geom and gctl_get_provider: provide feedback when the requested argument is missing.
Attached
Detach File
Event Timeline