diff options
author | marcel <marcel@FreeBSD.org> | 2006-04-07 16:19:48 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2006-04-07 16:19:48 +0000 |
commit | a5bd277da080a89464e393bfbb625d892e539861 (patch) | |
tree | 1ae38084ee26369df55e59710dde0dc2d083301b /sys/geom/geom_bsd.c | |
parent | aa5c1066ffe09e054adbe29e77187418997d933b (diff) | |
download | FreeBSD-src-a5bd277da080a89464e393bfbb625d892e539861.zip FreeBSD-src-a5bd277da080a89464e393bfbb625d892e539861.tar.gz |
Change gctl_set_param() to return an error instead of setting an
error on the request. Add a wrapper, gctl_set_param_err(), that
sets the error on the request from the error returned by
gctl_set_param() and update current callers of gctl_set_param()
to call gctl_set_param_err() instead.
This makes gctl_set_param() much more usable in situations where
the caller knows better what to do with certain (apparent) error
conditions and setting an error on the request is not one of the
things that need to be done.
Diffstat (limited to 'sys/geom/geom_bsd.c')
-rw-r--r-- | sys/geom/geom_bsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c index b7402cf..7d5b5d1 100644 --- a/sys/geom/geom_bsd.c +++ b/sys/geom/geom_bsd.c @@ -635,8 +635,8 @@ g_bsd_config(struct gctl_req *req, struct g_class *mp, char const *verb) gsp = gp->softc; ms = gsp->softc; if (!strcmp(verb, "read mbroffset")) { - gctl_set_param(req, "mbroffset", - &ms->mbroffset, sizeof(ms->mbroffset)); + gctl_set_param_err(req, "mbroffset", &ms->mbroffset, + sizeof(ms->mbroffset)); return; } else if (!strcmp(verb, "write label")) { label = gctl_get_paraml(req, "label", LABELSIZE); |