Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107218598
D21972.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21972.diff
View Options
Index: head/sys/geom/geom.h
===================================================================
--- head/sys/geom/geom.h
+++ head/sys/geom/geom.h
@@ -428,6 +428,7 @@
void *gctl_get_param(struct gctl_req *req, const char *param, int *len);
char const *gctl_get_asciiparam(struct gctl_req *req, const char *param);
void *gctl_get_paraml(struct gctl_req *req, const char *param, int len);
+void *gctl_get_paraml_opt(struct gctl_req *req, const char *param, int len);
int gctl_error(struct gctl_req *req, const char *fmt, ...) __printflike(2, 3);
struct g_class *gctl_get_class(struct gctl_req *req, char const *arg);
struct g_geom *gctl_get_geom(struct gctl_req *req, struct g_class *mpr, char const *arg);
Index: head/sys/geom/geom_ctl.c
===================================================================
--- head/sys/geom/geom_ctl.c
+++ head/sys/geom/geom_ctl.c
@@ -365,18 +365,27 @@
}
void *
-gctl_get_paraml(struct gctl_req *req, const char *param, int len)
+gctl_get_paraml_opt(struct gctl_req *req, const char *param, int len)
{
int i;
void *p;
p = gctl_get_param(req, param, &i);
- if (p == NULL)
- gctl_error(req, "Missing %s argument", param);
- else if (i != len) {
+ if (i != len) {
p = NULL;
gctl_error(req, "Wrong length %s argument", param);
}
+ return (p);
+}
+
+void *
+gctl_get_paraml(struct gctl_req *req, const char *param, int len)
+{
+ void *p;
+
+ p = gctl_get_paraml_opt(req, param, len);
+ if (p == NULL)
+ gctl_error(req, "Missing %s argument", param);
return (p);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 3:55 PM (14 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15770888
Default Alt Text
D21972.diff (1 KB)
Attached To
Mode
D21972: Add support to geom_nop.ko kernel module for older geom_nop.so userland modules.
Attached
Detach File
Event Timeline
Log In to Comment