svn commit: r312861 - stable/11/sys/geom/multipath

Alexander Motin mav at FreeBSD.org
Fri Jan 27 05:58:54 UTC 2017


Author: mav
Date: Fri Jan 27 05:58:53 2017
New Revision: 312861
URL: https://svnweb.freebsd.org/changeset/base/312861

Log:
  MFC r312533: Report disk addition errors on `add` or `create` subcommand.

Modified:
  stable/11/sys/geom/multipath/g_multipath.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/geom/multipath/g_multipath.c
==============================================================================
--- stable/11/sys/geom/multipath/g_multipath.c	Fri Jan 27 04:52:27 2017	(r312860)
+++ stable/11/sys/geom/multipath/g_multipath.c	Fri Jan 27 05:58:53 2017	(r312861)
@@ -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


More information about the svn-src-all mailing list