Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102723901
D35924.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35924.diff
View Options
diff --git a/stand/efi/include/efilib.h b/stand/efi/include/efilib.h
--- a/stand/efi/include/efilib.h
+++ b/stand/efi/include/efilib.h
@@ -85,7 +85,6 @@
}
int efi_getdev(void **vdev, const char *devspec, const char **path);
-char *efi_fmtdev(void *vdev);
int efi_setcurrdev(struct env_var *ev, int flags, const void *value);
diff --git a/stand/efi/libefi/devicename.c b/stand/efi/libefi/devicename.c
--- a/stand/efi/libefi/devicename.c
+++ b/stand/efi/libefi/devicename.c
@@ -171,32 +171,6 @@
return (err);
}
-char *
-efi_fmtdev(void *vdev)
-{
- struct devdesc *dev = (struct devdesc *)vdev;
- static char buf[SPECNAMELEN + 1];
-
- switch(dev->d_dev->dv_type) {
- case DEVT_NONE:
- strcpy(buf, "(no device)");
- break;
-
- case DEVT_DISK:
- return (disk_fmtdev(vdev));
-
-#ifdef EFI_ZFS_BOOT
- case DEVT_ZFS:
- return (zfs_fmtdev(dev));
-#endif
- default:
- sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit);
- break;
- }
-
- return (buf);
-}
-
/*
* Set currdev to suit the value being supplied in (value)
*/
diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -478,7 +478,7 @@
}
/* Try reading the /etc/fstab file to select the root device */
- getrootmount(efi_fmtdev((void *)rootdev));
+ getrootmount(devformat(rootdev));
addr = 0;
for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) {
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -203,7 +203,7 @@
{
const char *devname;
- devname = efi_fmtdev(currdev);
+ devname = devformat(currdev);
printf("Setting currdev to %s\n", devname);
set_currdev(devname);
}
@@ -273,7 +273,7 @@
currdev.pool_guid = guid;
currdev.root_guid = 0;
set_currdev_devdesc((struct devdesc *)&currdev);
- devname = efi_fmtdev(&currdev);
+ devname = devformat(&currdev.dd);
init_zfs_boot_options(devname);
rv = sanity_check_currdev();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 9:27 AM (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14674057
Default Alt Text
D35924.diff (1 KB)
Attached To
Mode
D35924: stand: efi_fmtdev can be reduced to devformat
Attached
Detach File
Event Timeline
Log In to Comment