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.
This commit is contained in:
Pawel Jakub Dawidek 2010-09-14 11:36:26 +00:00
parent f104beb787
commit d1db39d90e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212608

View File

@ -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);