Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 2015 22:42:03 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r292576 - head/sys/boot/efi/boot1
Message-ID:  <201512212242.tBLMg3IH035362@repo.freebsd.org>

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



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