Author: mav
Date: Fri Jan 20 13:49:04 2017
New Revision: 312533
URL: https://svnweb.freebsd.org/changeset/base/312533

Log:
  Report disk addition errors on `add` or `create` subcommand.
  
  MFC after:    1 week

Modified:
  head/sys/geom/multipath/g_multipath.c

Modified: head/sys/geom/multipath/g_multipath.c
==============================================================================
--- head/sys/geom/multipath/g_multipath.c       Fri Jan 20 13:39:07 2017        
(r312532)
+++ head/sys/geom/multipath/g_multipath.c       Fri Jan 20 13:49:04 2017        
(r312533)
@@ -923,6 +923,7 @@ g_multipath_ctl_add_name(struct gctl_req
        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
                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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to