Collapse the meta arguments into normal arguments, trying to distinguish

just makes our own life harder.
This commit is contained in:
Poul-Henning Kamp 2003-04-22 19:31:00 +00:00
parent 2d93d309a7
commit 64a5766ef7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113861
2 changed files with 1 additions and 38 deletions

View File

@ -65,10 +65,7 @@ gctl_dump(struct gctl_req *req, FILE *f)
fprintf(f, " error:\tNULL\n");
for (i = 0; i < req->narg; i++) {
ap = &req->arg[i];
if (ap->name != NULL)
fprintf(f, " param:\t\"%s\"", ap->name);
else
fprintf(f, " meta:\t@%jd", (intmax_t)ap->offset);
fprintf(f, " param:\t\"%s\"", ap->name);
fprintf(f, " [%s%s",
ap->flag & GCTL_PARAM_RD ? "R" : "",
ap->flag & GCTL_PARAM_WR ? "W" : "");
@ -205,38 +202,6 @@ gctl_rw_param(struct gctl_req *req, const char *name, int len, void* value)
ap->len = strlen(value) + 1;
}
void
gctl_ro_meta(struct gctl_req *req, off_t offset, u_int len, const void* value)
{
struct gctl_req_arg *ap;
if (req == NULL || req->error != NULL)
return;
ap = gctl_new_arg(req);
if (ap == NULL)
return;
ap->value = __DECONST(void *, value);
ap->flag = GCTL_PARAM_RD;
ap->offset = offset;
ap->len = len;
}
void
gctl_rw_meta(struct gctl_req *req, off_t offset, u_int len, void* value)
{
struct gctl_req_arg *ap;
if (req == NULL || req->error != NULL)
return;
ap = gctl_new_arg(req);
if (ap == NULL)
return;
ap->value = value;
ap->flag = GCTL_PARAM_RW;
ap->offset = offset;
ap->len = len;
}
const char *
gctl_issue(struct gctl_req *req)
{

View File

@ -137,8 +137,6 @@ void gctl_dump(struct gctl_req *req, FILE *f);
void gctl_free(struct gctl_req *req);
struct gctl_req *gctl_get_handle(enum gctl_request req);
const char *gctl_issue(struct gctl_req *req);
void gctl_ro_meta(struct gctl_req *req, off_t offset, u_int len, const void* val);
void gctl_rw_meta(struct gctl_req *req, off_t offset, u_int len, void* val);
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);