svn commit: r293299 - stable/10/sys/boot/efi/boot1

Ed Maste emaste at FreeBSD.org
Thu Jan 7 02:37:19 UTC 2016


Author: emaste
Date: Thu Jan  7 02:37:17 2016
New Revision: 293299
URL: https://svnweb.freebsd.org/changeset/base/293299

Log:
  MFC r292576: 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).

Modified:
  stable/10/sys/boot/efi/boot1/boot1.c

Modified: stable/10/sys/boot/efi/boot1/boot1.c
==============================================================================
--- stable/10/sys/boot/efi/boot1/boot1.c	Thu Jan  7 02:33:28 2016	(r293298)
+++ stable/10/sys/boot/efi/boot1/boot1.c	Thu Jan  7 02:37:17 2016	(r293299)
@@ -308,18 +308,21 @@ load(const char *fname)
 	status = systab->BootServices->LoadImage(TRUE, image, bootdevpath,
 	    buffer, bufsize, &loaderhandle);
 	if (EFI_ERROR(status))
-		printf("LoadImage failed with error %d\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 %d\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 %d\n", status);
+		printf("StartImage failed with error %lu\n",
+		    status & ~EFI_ERROR_MASK);
 }
 
 static void


More information about the svn-src-all mailing list