Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145955928
D35926.1778978091.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35926.1778978091.diff
View Options
diff --git a/stand/uboot/devicename.c b/stand/uboot/devicename.c
--- a/stand/uboot/devicename.c
+++ b/stand/uboot/devicename.c
@@ -160,29 +160,6 @@
}
-char *
-uboot_fmtdev(void *vdev)
-{
- struct uboot_devdesc *dev = (struct uboot_devdesc *)vdev;
- static char buf[128];
-
- switch(dev->dd.d_dev->dv_type) {
- case DEVT_NONE:
- strcpy(buf, "(no device)");
- break;
-
- case DEVT_DISK:
-#ifdef LOADER_DISK_SUPPORT
- return (disk_fmtdev(vdev));
-#endif
-
- case DEVT_NET:
- sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit);
- break;
- }
- return(buf);
-}
-
/*
* Set currdev to suit the value being supplied in (value).
*/
diff --git a/stand/uboot/libuboot.h b/stand/uboot/libuboot.h
--- a/stand/uboot/libuboot.h
+++ b/stand/uboot/libuboot.h
@@ -50,7 +50,6 @@
#endif
int uboot_getdev(void **vdev, const char *devspec, const char **path);
-char *uboot_fmtdev(void *vdev);
int uboot_setcurrdev(struct env_var *ev, int flags, const void *value);
extern int devs_no;
diff --git a/stand/uboot/main.c b/stand/uboot/main.c
--- a/stand/uboot/main.c
+++ b/stand/uboot/main.c
@@ -533,7 +533,7 @@
return (0xbadef1ce);
}
- ldev = uboot_fmtdev(&currdev);
+ ldev = devformat(&currdev.dd);
env_setenv("currdev", EV_VOLATILE, ldev, uboot_setcurrdev, env_nounset);
env_setenv("loaddev", EV_VOLATILE, ldev, env_noset, env_nounset);
printf("Booting from %s\n", ldev);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 17, 12:34 AM (6 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28706213
Default Alt Text
D35926.1778978091.diff (1 KB)
Attached To
Mode
D35926: stand: uboot_fmtdev can be reduced to devformat
Attached
Detach File
Event Timeline
Log In to Comment