summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-22 19:42:05 +0000
committerphk <phk@FreeBSD.org>2003-04-22 19:42:05 +0000
commit817cb6ca1f585f03fdd44cea0be5889a751e703a (patch)
treedf477f2fa42ca52ce42546a41f88a877d539675a
parentaba647cbf42e6b3b15b69e7da7862d1ca33a544e (diff)
downloadFreeBSD-src-817cb6ca1f585f03fdd44cea0be5889a751e703a.zip
FreeBSD-src-817cb6ca1f585f03fdd44cea0be5889a751e703a.tar.gz
Collapse meta arguments into regular arguments, the distinction is
more trouble than it is worth.
-rw-r--r--sys/geom/geom_ctl.c12
-rw-r--r--sys/geom/geom_ctl.h25
2 files changed, 12 insertions, 25 deletions
diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c
index 0457972..ab50552 100644
--- a/sys/geom/geom_ctl.c
+++ b/sys/geom/geom_ctl.c
@@ -151,13 +151,8 @@ gctl_copyin(struct gctl_req *req)
!useracc(ap[i].value, ap[i].len,
ap[i].flag & GCTL_PARAM_RW))
error = gctl_error(req, "no access to param data");
- if (ap[i].name == NULL) {
- if (req->reqt->meta)
- continue;
- error = gctl_error(req,
- "request does not take metadata arguments");
+ if (error)
break;
- }
p = NULL;
if (ap[i].nlen < 1 || ap[i].nlen > SPECNAMELEN) {
error = gctl_error(req, "wrong param name length");
@@ -205,10 +200,7 @@ gctl_dump(struct gctl_req *req)
}
for (i = 0; i < req->narg; i++) {
ap = &req->arg[i];
- if (ap->name != NULL)
- printf(" param:\t\"%s\"", ap->name);
- else
- printf(" meta:\t@%jd", (intmax_t)ap->offset);
+ printf(" param:\t\"%s\"", ap->name);
printf(" [%s%s%d] = ",
ap->flag & GCTL_PARAM_RD ? "R" : "",
ap->flag & GCTL_PARAM_WR ? "W" : "",
diff --git a/sys/geom/geom_ctl.h b/sys/geom/geom_ctl.h
index 15bcef1..5270677 100644
--- a/sys/geom/geom_ctl.h
+++ b/sys/geom/geom_ctl.h
@@ -50,8 +50,6 @@ enum gctl_request {
GCTL_DESTROY_PROVIDER,
GCTL_INSERT_GEOM,
GCTL_ELIMINATE_GEOM,
- GCTL_WRITE_META,
- GCTL_READ_META
};
#ifdef GCTL_TABLE
@@ -61,24 +59,21 @@ struct gctl_req_table {
int provider;
int consumer;
int params;
- int meta;
char *name;
enum gctl_request request;
} gcrt[] = {
-/* Cl Ge Pr Co Pa Me Name Request */
- { 1, 0, 1, 0, 1, 0, "create geom", GCTL_CREATE_GEOM },
- { 0, 1, 0, 0, 1, 0, "destroy geom", GCTL_DESTROY_GEOM },
- { 0, 1, 1, 0, 1, 0, "attach", GCTL_ATTACH },
- { 0, 1, 1, 0, 1, 0, "detach", GCTL_DETACH },
- { 0, 1, 0, 0, 1, 0, "create provider", GCTL_CREATE_PROVIDER },
- { 0, 1, 1, 0, 1, 0, "destroy provider", GCTL_DESTROY_PROVIDER },
- { 1, 1, 1, 0, 1, 0, "insert geom", GCTL_INSERT_GEOM },
- { 0, 1, 0, 0, 1, 0, "eliminate geom", GCTL_ELIMINATE_GEOM },
- { 0, 1, 0, 0, 1, 1, "write meta", GCTL_WRITE_META },
- { 0, 1, 0, 0, 1, 1, "read meta", GCTL_READ_META },
+/* Cl Ge Pr Co Pa Name Request */
+ { 1, 0, 1, 0, 1, "create geom", GCTL_CREATE_GEOM },
+ { 0, 1, 0, 0, 1, "destroy geom", GCTL_DESTROY_GEOM },
+ { 0, 1, 1, 0, 1, "attach", GCTL_ATTACH },
+ { 0, 1, 1, 0, 1, "detach", GCTL_DETACH },
+ { 0, 1, 0, 0, 1, "create provider", GCTL_CREATE_PROVIDER },
+ { 0, 1, 1, 0, 1, "destroy provider", GCTL_DESTROY_PROVIDER },
+ { 1, 1, 1, 0, 1, "insert geom", GCTL_INSERT_GEOM },
+ { 0, 1, 0, 0, 1, "eliminate geom", GCTL_ELIMINATE_GEOM },
/* Terminator entry */
- { 1, 1, 1, 1, 1, 1, "*INVALID*", GCTL_INVALID_REQUEST }
+ { 1, 1, 1, 1, 1, "*INVALID*", GCTL_INVALID_REQUEST }
};
#endif /* GCTL_TABLE */
OpenPOWER on IntegriCloud