9127 efi: Only scan the BLKIO MEDIA once
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
diff --git a/usr/src/boot/sys/boot/efi/loader/main.c b/usr/src/boot/sys/boot/efi/loader/main.c
index 3570c4f..1113ac6 100644
--- a/usr/src/boot/sys/boot/efi/loader/main.c
+++ b/usr/src/boot/sys/boot/efi/loader/main.c
@@ -435,11 +435,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++) {