svn commit: r292576 - head/sys/boot/efi/boot1

Ed Maste emaste at FreeBSD.org
Mon Dec 21 22:42:04 UTC 2015


Author: emaste
Date: Mon Dec 21 22:42:03 2015
New Revision: 292576
URL: https://svnweb.freebsd.org/changeset/base/292576

Log:
  boot1.efi: show EFI error number, not full status value
  
  EFI return values set the high bit to indicate an error. The log
  messages changed here are printed only in the case of an error,
  so including the error bit is redundant. Also switch to decimal to
  match the error definitions (in sys/boot/efi/include/efierr.h).
  
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/boot/efi/boot1/boot1.c

Modified: head/sys/boot/efi/boot1/boot1.c
==============================================================================
--- head/sys/boot/efi/boot1/boot1.c	Mon Dec 21 22:40:29 2015	(r292575)
+++ head/sys/boot/efi/boot1/boot1.c	Mon Dec 21 22:42:03 2015	(r292576)
@@ -330,18 +330,21 @@ load(const char *fname)
 	status = systab->BootServices->LoadImage(TRUE, image, bootdevpath,
 	    buffer, bufsize, &loaderhandle);
 	if (EFI_ERROR(status))
-		printf("LoadImage failed with error %lx\n", status);
+		printf("LoadImage failed with error %lu\n",
+		    status & ~EFI_ERROR_MASK);
 
 	status = systab->BootServices->HandleProtocol(loaderhandle,
 	    &LoadedImageGUID, (VOID**)&loaded_image);
 	if (EFI_ERROR(status))
-		printf("HandleProtocol failed with error %lx\n", status);
+		printf("HandleProtocol failed with error %lu\n",
+		    status & ~EFI_ERROR_MASK);
 
 	loaded_image->DeviceHandle = bootdevhandle;
 
 	status = systab->BootServices->StartImage(loaderhandle, NULL, NULL);
 	if (EFI_ERROR(status))
-		printf("StartImage failed with error %lx\n", status);
+		printf("StartImage failed with error %lu\n",
+		    status & ~EFI_ERROR_MASK);
 }
 
 static void


More information about the svn-src-head mailing list