svn commit: r363036 - head/sys/geom/concat

Xin LI delphij at FreeBSD.org
Thu Jul 9 08:00:47 UTC 2020


Author: delphij
Date: Thu Jul  9 08:00:46 2020
New Revision: 363036
URL: https://svnweb.freebsd.org/changeset/base/363036

Log:
  g_concat_find_device: trim /dev/ if it is present, like other GEOM
  classes.
  
  Reviewed by:	cem
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D25596

Modified:
  head/sys/geom/concat/g_concat.c

Modified: head/sys/geom/concat/g_concat.c
==============================================================================
--- head/sys/geom/concat/g_concat.c	Thu Jul  9 03:46:07 2020	(r363035)
+++ head/sys/geom/concat/g_concat.c	Thu Jul  9 08:00:46 2020	(r363036)
@@ -897,6 +897,9 @@ g_concat_find_device(struct g_class *mp, const char *n
 	struct g_concat_softc *sc;
 	struct g_geom *gp;
 
+	if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0)
+		name += strlen(_PATH_DEV);
+
 	LIST_FOREACH(gp, &mp->geom, geom) {
 		sc = gp->softc;
 		if (sc == NULL)


More information about the svn-src-all mailing list