summaryrefslogtreecommitdiffstats
path: root/lib/libgeom/geom_ctl.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-01 15:05:22 +0000
committerphk <phk@FreeBSD.org>2003-06-01 15:05:22 +0000
commit8f1078dc32ccf55afc8de54c288b9c328da665f7 (patch)
treee64d094399df04a1c4af6c32eb0deee682b1628a /lib/libgeom/geom_ctl.c
parent069191fcbf030ae2966ebec47a4080756e9cd7f2 (diff)
downloadFreeBSD-src-8f1078dc32ccf55afc8de54c288b9c328da665f7.zip
FreeBSD-src-8f1078dc32ccf55afc8de54c288b9c328da665f7.tar.gz
Add the part of the last commit which cvs appearantly didn't like
the first time.
Diffstat (limited to 'lib/libgeom/geom_ctl.c')
-rw-r--r--lib/libgeom/geom_ctl.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/libgeom/geom_ctl.c b/lib/libgeom/geom_ctl.c
index c3d9ee5..d308849 100644
--- a/lib/libgeom/geom_ctl.c
+++ b/lib/libgeom/geom_ctl.c
@@ -45,8 +45,6 @@
#define GCTL_TABLE 1
#include <libgeom.h>
-#include <geom/geom_ext.h>
-
void
gctl_dump(struct gctl_req *req, FILE *f)
{
@@ -58,14 +56,14 @@ gctl_dump(struct gctl_req *req, FILE *f)
fprintf(f, "Dump of gctl request at NULL\n");
return;
}
- fprintf(f, "Dump of gctl %s request at %p:\n", req->reqt->name, req);
+ fprintf(f, "Dump of gctl request at %p:\n", req);
if (req->error != NULL)
fprintf(f, " error:\t\"%s\"\n", req->error);
else
fprintf(f, " error:\tNULL\n");
for (i = 0; i < req->narg; i++) {
ap = &req->arg[i];
- fprintf(f, " param:\t\"%s\"", ap->name);
+ fprintf(f, " param:\t\"%s\" (%d)", ap->name, ap->nlen);
fprintf(f, " [%s%s",
ap->flag & GCTL_PARAM_RD ? "R" : "",
ap->flag & GCTL_PARAM_WR ? "W" : "");
@@ -119,22 +117,11 @@ gctl_check_alloc(struct gctl_req *req, void *ptr)
* XXX: Why bother checking the type ?
*/
struct gctl_req *
-gctl_get_handle(enum gctl_request req)
+gctl_get_handle(void)
{
- struct gctl_req_table *gtp;
struct gctl_req *rp;
rp = calloc(1, sizeof *rp);
- if (rp == NULL)
- return (NULL);
- for (gtp = gcrt; gtp->request != req; gtp++)
- if (gtp->request == GCTL_INVALID_REQUEST)
- break;
-
- rp->request = req;
- rp->reqt = gtp;
- if (rp->reqt->request == GCTL_INVALID_REQUEST)
- gctl_set_error(rp, "Invalid request");
return (rp);
}
OpenPOWER on IntegriCloud