Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 02:37:17 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r293299 - stable/10/sys/boot/efi/boot1
Message-ID:  <201601070237.u072bHSa001510@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601070237.u072bHSa001510>