Index: boot0cfg.c =================================================================== RCS file: /srv/ncvs/src/usr.sbin/boot0cfg/boot0cfg.c,v retrieving revision 1.20 diff -u -r1.20 boot0cfg.c --- boot0cfg.c 15 Jul 2005 08:04:32 -0000 1.20 +++ boot0cfg.c 26 Apr 2008 13:46:03 -0000 @@ -80,7 +80,6 @@ static int boot0version(const u_int8_t *); static int boot0bs(const u_int8_t *); static void stropt(const char *, int *, int *); -static char *mkrdev(const char *); static int argtoi(const char *, int, int, int); static void usage(void); @@ -142,7 +141,9 @@ argv += optind; if (argc != 1) usage(); - disk = mkrdev(*argv); + disk = g_provider_from_path(*argv); + if (disk == NULL) + errx(1, "No more memory"); up = B_flag || d_arg != -1 || m_arg != -1 || o_flag || s_arg != -1 || t_arg != -1; @@ -422,26 +423,6 @@ } /* - * Produce a device path for a "canonical" name, where appropriate. - */ -static char * -mkrdev(const char *fname) -{ - char buf[MAXPATHLEN]; - char *s; - - if (!strchr(fname, '/')) { - snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname); - s = strdup(buf); - } else - s = strdup(fname); - - if (s == NULL) - errx(1, "No more memory"); - return s; -} - -/* * Convert and check an option argument. */ static int