Index: g_part_ebr.c =================================================================== --- g_part_ebr.c (revision 189937) +++ g_part_ebr.c (working copy) @@ -343,7 +343,7 @@ char *buf, size_t bufsz) { - snprintf(buf, bufsz, ".%08u", entry->gpe_index); + snprintf(buf, bufsz, "+%08x", entry->gpe_index); return (buf); } Index: g_part.c =================================================================== --- g_part.c (revision 189937) +++ g_part.c (working copy) @@ -49,6 +49,10 @@ #include "g_part_if.h" +#ifndef _PATH_DEV +#define _PATH_DEV "/dev/" +#endif + static kobj_method_t g_part_null_methods[] = { { 0, 0 } }; @@ -273,12 +277,17 @@ } static int -g_part_parm_geom(const char *p, struct g_geom **v) +g_part_parm_geom(const char *rawname, struct g_geom **v) { struct g_geom *gp; + const char *pname; + if (strncmp(rawname, _PATH_DEV, strlen(_PATH_DEV)) == 0) + pname = rawname + strlen(_PATH_DEV); + else + pname = rawname; LIST_FOREACH(gp, &g_part_class.geom, geom) { - if (!strcmp(p, gp->name)) + if (!strcmp(pname, gp->name)) break; } if (gp == NULL) @@ -288,11 +297,14 @@ } static int -g_part_parm_provider(const char *p, struct g_provider **v) +g_part_parm_provider(const char *pname, struct g_provider **v) { struct g_provider *pp; - pp = g_provider_by_name(p); + if (strncmp(pname, _PATH_DEV, strlen(_PATH_DEV)) == 0) + pp = g_provider_by_name(pname + strlen(_PATH_DEV)); + else + pp = g_provider_by_name(pname); if (pp == NULL) return (EINVAL); *v = pp;