diff options
author | mav <mav@FreeBSD.org> | 2017-01-27 05:59:26 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2017-01-27 05:59:26 +0000 |
commit | 8d20a52909cad330e23205cdc1685bd0bdd7c4f7 (patch) | |
tree | 27dad77416472ae7ecd7809116f1299f3d40515e | |
parent | e7e38a82aec5f02fc694cbd0d0d6f34666f38085 (diff) | |
download | FreeBSD-src-8d20a52909cad330e23205cdc1685bd0bdd7c4f7.zip FreeBSD-src-8d20a52909cad330e23205cdc1685bd0bdd7c4f7.tar.gz |
MFC r312533: Report disk addition errors on `add` or `create` subcommand.
-rw-r--r-- | sys/geom/multipath/g_multipath.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index b461747..0c24cd3 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -923,6 +923,7 @@ g_multipath_ctl_add_name(struct gctl_req *req, struct g_class *mp, struct g_provider *pp; const char *mpname; static const char devpf[6] = "/dev/"; + int error; g_topology_assert(); @@ -972,10 +973,9 @@ g_multipath_ctl_add_name(struct gctl_req *req, struct g_class *mp, return; } - /* - * Now add.... - */ - (void) g_multipath_add_disk(gp, pp); + error = g_multipath_add_disk(gp, pp); + if (error != 0) + gctl_error(req, "Provider addition error: %d", error); } static void |