Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149327247
D14334.id39308.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D14334.id39308.diff
View Options
Index: head/stand/efi/include/efilib.h
===================================================================
--- head/stand/efi/include/efilib.h
+++ head/stand/efi/include/efilib.h
@@ -106,4 +106,7 @@
void cpy8to16(const char *, CHAR16 *, size_t);
void cpy16to8(const CHAR16 *, char *, size_t);
+/* efipart.c */
+int efipart_inithandles(void);
+
#endif /* _LOADER_EFILIB_H */
Index: head/stand/efi/libefi/efipart.c
===================================================================
--- head/stand/efi/libefi/efipart.c
+++ head/stand/efi/libefi/efipart.c
@@ -148,7 +148,7 @@
return (i);
}
-static int
+int
efipart_inithandles(void)
{
UINTN sz;
@@ -176,6 +176,10 @@
efipart_handles = hin;
efipart_nhandles = sz;
+#ifdef EFIPART_DEBUG
+ printf("%s: Got %d BLOCK IO MEDIA handle(s)\n", __func__,
+ efipart_nhandles);
+#endif
return (0);
}
@@ -319,11 +323,7 @@
static int
efipart_initfd(void)
{
- int rv;
- rv = efipart_inithandles();
- if (rv != 0)
- return (rv);
STAILQ_INIT(&fdinfo);
efipart_updatefd();
@@ -439,11 +439,7 @@
static int
efipart_initcd(void)
{
- int rv;
- rv = efipart_inithandles();
- if (rv != 0)
- return (rv);
STAILQ_INIT(&cdinfo);
efipart_updatecd();
@@ -685,11 +681,7 @@
static int
efipart_inithd(void)
{
- int rv;
- rv = efipart_inithandles();
- if (rv != 0)
- return (rv);
STAILQ_INIT(&hdinfo);
efipart_updatehd();
Index: head/stand/efi/loader/main.c
===================================================================
--- head/stand/efi/loader/main.c
+++ head/stand/efi/loader/main.c
@@ -456,11 +456,15 @@
}
/*
- * March through the device switch probing for things.
+ * Scan the BLOCK IO MEDIA handles then
+ * march through the device switch probing for things.
*/
- for (i = 0; devsw[i] != NULL; i++)
- if (devsw[i]->dv_init != NULL)
- (devsw[i]->dv_init)();
+ if ((i = efipart_inithandles()) == 0) {
+ for (i = 0; devsw[i] != NULL; i++)
+ if (devsw[i]->dv_init != NULL)
+ (devsw[i]->dv_init)();
+ } else
+ printf("efipart_inithandles failed %d, expect failures", i);
printf("Command line arguments:");
for (i = 0; i < argc; i++)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 24, 6:51 PM (9 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30265830
Default Alt Text
D14334.id39308.diff (2 KB)
Attached To
Mode
D14334: efi: Only scan the BLKIO MEDIA once
Attached
Detach File
Event Timeline
Log In to Comment