summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2016-01-07 02:37:17 +0000
committeremaste <emaste@FreeBSD.org>2016-01-07 02:37:17 +0000
commitca7ff8637aa6d5b9c27153cf6cb3a1fd15c3cced (patch)
treefb4dbc01ff151c47f261a00835845af74e67aa08
parent1cfb72b9e2934c275c6f8042f57c4dfed24d39cf (diff)
downloadFreeBSD-src-ca7ff8637aa6d5b9c27153cf6cb3a1fd15c3cced.zip
FreeBSD-src-ca7ff8637aa6d5b9c27153cf6cb3a1fd15c3cced.tar.gz
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).
-rw-r--r--sys/boot/efi/boot1/boot1.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/efi/boot1/boot1.c b/sys/boot/efi/boot1/boot1.c
index e5719ff..e0c26da 100644
--- a/sys/boot/efi/boot1/boot1.c
+++ b/sys/boot/efi/boot1/boot1.c
@@ -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
OpenPOWER on IntegriCloud