diff options
author | phk <phk@FreeBSD.org> | 2003-06-01 15:05:22 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-06-01 15:05:22 +0000 |
commit | 8f1078dc32ccf55afc8de54c288b9c328da665f7 (patch) | |
tree | e64d094399df04a1c4af6c32eb0deee682b1628a /lib/libgeom | |
parent | 069191fcbf030ae2966ebec47a4080756e9cd7f2 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libgeom/geom_ctl.c | 19 | ||||
-rw-r--r-- | lib/libgeom/libgeom.h | 2 |
2 files changed, 4 insertions, 17 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); } diff --git a/lib/libgeom/libgeom.h b/lib/libgeom/libgeom.h index 83082e7..581d477 100644 --- a/lib/libgeom/libgeom.h +++ b/lib/libgeom/libgeom.h @@ -135,7 +135,7 @@ struct gctl_req; void gctl_dump(struct gctl_req *req, FILE *f); #endif void gctl_free(struct gctl_req *req); -struct gctl_req *gctl_get_handle(enum gctl_request req); +struct gctl_req *gctl_get_handle(void); const char *gctl_issue(struct gctl_req *req); void gctl_ro_param(struct gctl_req *req, const char *name, int len, const void* val); void gctl_rw_param(struct gctl_req *req, const char *name, int len, void* val); |