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_ccd.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_ccd.c')
-rw-r--r-- | sys/geom/geom_ccd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index bfa125d..fb66882 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -782,7 +782,7 @@ g_ccd_create(struct gctl_req *req, struct g_class *mp) else sbuf_printf(sb, "concatenated\n"); sbuf_finish(sb); - gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); + gctl_set_param_err(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); } @@ -833,7 +833,7 @@ g_ccd_list(struct gctl_req *req, struct g_class *mp) sbuf_printf(sb, "\n"); } sbuf_finish(sb); - gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); + gctl_set_param_err(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); } |