diff --git a/stand/i386/libi386/bootinfo32.c b/stand/i386/libi386/bootinfo32.c --- a/stand/i386/libi386/bootinfo32.c +++ b/stand/i386/libi386/bootinfo32.c @@ -167,7 +167,7 @@ } /* Try reading the /etc/fstab file to select the root device */ - getrootmount(i386_fmtdev((void *)rootdev)); + getrootmount(devformat(&rootdev->dd)); /* Do legacy rootdev guessing */ @@ -191,7 +191,7 @@ rootdev->dd.d_dev->dv_type); } if (bootdevnr == -1) { - printf("root device %s invalid\n", i386_fmtdev(rootdev)); + printf("root device %s invalid\n", devformat(&rootdev->dd)); return (EINVAL); } free(rootdev); diff --git a/stand/i386/libi386/bootinfo64.c b/stand/i386/libi386/bootinfo64.c --- a/stand/i386/libi386/bootinfo64.c +++ b/stand/i386/libi386/bootinfo64.c @@ -216,7 +216,7 @@ } /* Try reading the /etc/fstab file to select the root device */ - getrootmount(i386_fmtdev((void *)rootdev)); + getrootmount(devformat(&rootdev->dd)); addr = 0; /* find the last module in the chain */ diff --git a/stand/i386/libi386/devicename.c b/stand/i386/libi386/devicename.c --- a/stand/i386/libi386/devicename.c +++ b/stand/i386/libi386/devicename.c @@ -171,33 +171,6 @@ return(err); } - -char * -i386_fmtdev(void *vdev) -{ - struct i386_devdesc *dev = (struct i386_devdesc *)vdev; - static char buf[128]; /* XXX device length constant? */ - - switch(dev->dd.d_dev->dv_type) { - case DEVT_NONE: - strcpy(buf, "(no device)"); - break; - - case DEVT_CD: - case DEVT_NET: - sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit); - break; - - case DEVT_DISK: - return (disk_fmtdev(vdev)); - - case DEVT_ZFS: - return(zfs_fmtdev(vdev)); - } - return(buf); -} - - /* * Set currdev to suit the value being supplied in (value) */ diff --git a/stand/i386/loader/main.c b/stand/i386/loader/main.c --- a/stand/i386/loader/main.c +++ b/stand/i386/loader/main.c @@ -390,9 +390,9 @@ init_zfs_boot_options(devformat(&new_currdev.dd)); #endif - env_setenv("currdev", EV_VOLATILE, i386_fmtdev(&new_currdev), + env_setenv("currdev", EV_VOLATILE, devformat(&new_currdev.dd), i386_setcurrdev, env_nounset); - env_setenv("loaddev", EV_VOLATILE, i386_fmtdev(&new_currdev), + env_setenv("loaddev", EV_VOLATILE, devformat(&new_currdev.dd), env_noset, env_nounset); }