diff options
author | pjd <pjd@FreeBSD.org> | 2010-09-14 11:36:26 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-09-14 11:36:26 +0000 |
commit | 6ca1075f10acc4f1a39b11c9fa31edac18d8eaad (patch) | |
tree | 35cdc8074e5dce810052d7e9848abe1fdc2eaf5f /sbin | |
parent | 66201bc1097bff360679b57454fa36f7c9d6f33f (diff) | |
download | FreeBSD-src-6ca1075f10acc4f1a39b11c9fa31edac18d8eaad.zip FreeBSD-src-6ca1075f10acc4f1a39b11c9fa31edac18d8eaad.tar.gz |
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.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/geom/class/part/geom_part.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c index 972e2ff..a0b84c2 100644 --- a/sbin/geom/class/part/geom_part.c +++ b/sbin/geom/class/part/geom_part.c @@ -183,6 +183,8 @@ find_geom(struct gclass *classp, const char *name) { 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); |