Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/stand/efiboot If the boot device could not be determined...



details:   https://anonhg.NetBSD.org/src/rev/ab1df87a102b
branches:  trunk
changeset: 365628:ab1df87a102b
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Aug 24 23:19:42 2018 +0000

description:
If the boot device could not be determined, use the first one found as
the default. While here, remove unnecessary calls to LibFileSystemInfo().

diffstat:

 sys/stand/efiboot/efifile.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r d1750c6dc1a6 -r ab1df87a102b sys/stand/efiboot/efifile.c
--- a/sys/stand/efiboot/efifile.c       Fri Aug 24 21:56:13 2018 +0000
+++ b/sys/stand/efiboot/efifile.c       Fri Aug 24 23:19:42 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efifile.c,v 1.1 2018/08/24 02:01:06 jmcneill Exp $ */
+/* $NetBSD: efifile.c,v 1.2 2018/08/24 23:19:42 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -62,7 +62,6 @@
 void
 efi_file_system_probe(void)
 {
-       EFI_FILE_SYSTEM_INFO *fsi;
        EFI_FILE_HANDLE fh;
        EFI_STATUS status;
        int n;
@@ -76,12 +75,10 @@
                if (!fh)
                        continue;
 
-               fsi = LibFileSystemInfo(fh);
-               if (!fsi)
-                       continue;
-
                if (efi_bootdp && LibMatchDevicePaths(DevicePathFromHandle(efi_vol[n]), efi_bootdp) == TRUE)
                        efi_bootvol = n;
+               else if (efi_bootdp == NULL && efi_bootvol == -1)
+                       efi_bootvol = n;
        }
 }
 



Home | Main Index | Thread Index | Old Index