stand: Replace zfs_fmtdev with generic devformat()

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D35973
This commit is contained in:
Warner Losh 2022-08-11 09:07:44 -06:00
parent 654b7837a6
commit edb26097cb
4 changed files with 5 additions and 5 deletions

View File

@ -387,7 +387,7 @@ extract_currdev(void)
#ifdef LOADER_ZFS_SUPPORT
if (new_currdev.dd.d_dev->dv_type == DEVT_ZFS)
init_zfs_boot_options(zfs_fmtdev(&new_currdev.dd));
init_zfs_boot_options(devformat(&new_currdev.dd));
#endif
env_setenv("currdev", EV_VOLATILE, i386_fmtdev(&new_currdev),

View File

@ -222,11 +222,11 @@ main(void)
devdesc.d_partition >= 0 ? devdesc.d_partition : 0xff);
/*
* zfs_fmtdev() can be called only after dv_init
* devformat() can be called only after dv_init
*/
if (bdev != NULL && bdev->dd.d_dev->dv_type == DEVT_ZFS) {
/* set up proper device name string for ZFS */
strncpy(boot_devname, zfs_fmtdev(&bdev->dd), sizeof (boot_devname));
strncpy(boot_devname, devformat(&bdev->dd), sizeof (boot_devname));
if (zfs_get_bootonce(bdev, OS_BOOTONCE, cmd,
sizeof(cmd)) == 0) {
nvlist_t *benv;

View File

@ -1583,7 +1583,7 @@ zfs_dev_open(struct open_file *f, ...)
rv = 0;
/* This device is not set as currdev, mount us private copy. */
if (mount == NULL)
rv = zfs_mount(zfs_fmtdev(&dev->dd), NULL, (void **)&mount);
rv = zfs_mount(devformat(&dev->dd), NULL, (void **)&mount);
if (rv == 0) {
f->f_devdata = mount;

View File

@ -260,7 +260,7 @@ extract_currdev(void)
bzero(&zdev, sizeof(zdev));
zdev.dd.d_dev = &zfs_dev;
init_zfs_boot_options(zfs_fmtdev(&zdev.dd));
init_zfs_boot_options(devformat(&zdev.dd));
dd = &zdev.dd;
} else
#endif