Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107716433
D35925.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D35925.diff
View Options
diff --git a/stand/userboot/userboot/bootinfo32.c b/stand/userboot/userboot/bootinfo32.c
--- a/stand/userboot/userboot/bootinfo32.c
+++ b/stand/userboot/userboot/bootinfo32.c
@@ -139,7 +139,7 @@
bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t *modulep, vm_offset_t *kernendp)
{
struct preloaded_file *xp, *kfp;
- struct i386_devdesc *rootdev;
+ struct devdesc *rootdev;
struct file_metadata *md;
vm_offset_t addr;
vm_offset_t kernend;
@@ -167,12 +167,12 @@
}
/* Try reading the /etc/fstab file to select the root device */
- getrootmount(userboot_fmtdev((void *)rootdev));
+ getrootmount(devformat(rootdev));
bootdevnr = 0;
#if 0
if (bootdevnr == -1) {
- printf("root device %s invalid\n", i386_fmtdev(rootdev));
+ printf("root device %s invalid\n", devformat(rootdev));
return (EINVAL);
}
#endif
diff --git a/stand/userboot/userboot/bootinfo64.c b/stand/userboot/userboot/bootinfo64.c
--- a/stand/userboot/userboot/bootinfo64.c
+++ b/stand/userboot/userboot/bootinfo64.c
@@ -182,7 +182,7 @@
bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernendp)
{
struct preloaded_file *xp, *kfp;
- struct userboot_devdesc *rootdev;
+ struct devdesc *rootdev;
struct file_metadata *md;
vm_offset_t addr;
uint64_t kernend;
@@ -211,7 +211,7 @@
}
/* Try reading the /etc/fstab file to select the root device */
- getrootmount(userboot_fmtdev((void *)rootdev));
+ getrootmount(devformat(rootdev));
/* find the last module in the chain */
addr = 0;
diff --git a/stand/userboot/userboot/devicename.c b/stand/userboot/userboot/devicename.c
--- a/stand/userboot/userboot/devicename.c
+++ b/stand/userboot/userboot/devicename.c
@@ -176,40 +176,6 @@
}
-char *
-userboot_fmtdev(void *vdev)
-{
- struct devdesc *dev = (struct devdesc *)vdev;
- static char buf[128]; /* XXX device length constant? */
-
- switch(dev->d_dev->dv_type) {
- case DEVT_NONE:
- strcpy(buf, "(no device)");
- break;
-
- case DEVT_CD:
- sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit);
- break;
-
- case DEVT_DISK:
- return (disk_fmtdev(vdev));
-
- case DEVT_NET:
- sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit);
- break;
-
- case DEVT_ZFS:
-#if defined(USERBOOT_ZFS_SUPPORT)
- return (zfs_fmtdev(vdev));
-#else
- sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit);
-#endif
- break;
- }
- return (buf);
-}
-
-
/*
* Set currdev to suit the value being supplied in (value)
*/
diff --git a/stand/userboot/userboot/libuserboot.h b/stand/userboot/userboot/libuserboot.h
--- a/stand/userboot/userboot/libuserboot.h
+++ b/stand/userboot/userboot/libuserboot.h
@@ -57,7 +57,6 @@
extern ssize_t userboot_copyout(vm_offset_t, void *, size_t);
extern ssize_t userboot_readin(readin_handle_t, vm_offset_t, size_t);
extern int userboot_getdev(void **, const char *, const char **);
-char *userboot_fmtdev(void *vdev);
int userboot_setcurrdev(struct env_var *ev, int flags, const void *value);
int bi_getboothowto(char *kargs);
diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c
--- a/stand/userboot/userboot/main.c
+++ b/stand/userboot/userboot/main.c
@@ -285,7 +285,7 @@
dd = &dev.dd;
}
- set_currdev(userboot_fmtdev(dd));
+ set_currdev(devformat(dd));
#if defined(USERBOOT_ZFS_SUPPORT)
if (userboot_zfs_found) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 18, 6:29 PM (10 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15849655
Default Alt Text
D35925.diff (3 KB)
Attached To
Mode
D35925: stand: userboot_fmtdev can be reduced to devformat
Attached
Detach File
Event Timeline
Log In to Comment