svn commit: r308125 - head/sys/boot/efi/loader

Emmanuel Vadot manu at FreeBSD.org
Mon Oct 31 11:30:02 UTC 2016


Author: manu
Date: Mon Oct 31 11:30:01 2016
New Revision: 308125
URL: https://svnweb.freebsd.org/changeset/base/308125

Log:
  In loader.efi, instead of exiting directly, try to fallback on the
  first EFI device if we can't find the one from which the image was loaded.
  
  Reviewed by:	allanjude,imp,jhb
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D6780

Modified:
  head/sys/boot/efi/loader/main.c

Modified: head/sys/boot/efi/loader/main.c
==============================================================================
--- head/sys/boot/efi/loader/main.c	Mon Oct 31 11:13:36 2016	(r308124)
+++ head/sys/boot/efi/loader/main.c	Mon Oct 31 11:30:01 2016	(r308125)
@@ -237,6 +237,11 @@ find_currdev(EFI_LOADED_IMAGE *img, stru
 		}
 	}
 
+	/* Try to fallback on first device */
+	if (devsw[0] != NULL) {
+		*dev = devsw[0];
+		return (0);
+	}
 	return (ENOENT);
 }
 


More information about the svn-src-head mailing list