Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Sep 2010 11:36:26 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212608 - head/sbin/geom/class/part
Message-ID:  <201009141136.o8EBaQKV080417@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Tue Sep 14 11:36:26 2010
New Revision: 212608
URL: http://svn.freebsd.org/changeset/base/212608

Log:
  All gpart(8) subcommands apart from the 'bootcode' subcommand handle
  given geom/provider names with and without /dev/ prefix. Teach the
  'bootcode' subcommand to handle /dev/<foo> names as well.

Modified:
  head/sbin/geom/class/part/geom_part.c

Modified: head/sbin/geom/class/part/geom_part.c
==============================================================================
--- head/sbin/geom/class/part/geom_part.c	Tue Sep 14 11:19:21 2010	(r212607)
+++ head/sbin/geom/class/part/geom_part.c	Tue Sep 14 11:36:26 2010	(r212608)
@@ -183,6 +183,8 @@ find_geom(struct gclass *classp, const c
 {
 	struct ggeom *gp;
 
+	if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0)
+		name += strlen(_PATH_DEV);
 	LIST_FOREACH(gp, &classp->lg_geom, lg_geom) {
 		if (strcmp(gp->lg_name, name) == 0)
 			return (gp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009141136.o8EBaQKV080417>