summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi/loader
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2016-01-18 15:55:25 +0000
committeremaste <emaste@FreeBSD.org>2016-01-18 15:55:25 +0000
commitafae46b0e1e77310e1f398e11cb333784311fdfa (patch)
tree3862e505b212f99aa56f0d0179501459fcaeb219 /sys/boot/efi/loader
parent800cde159e270c446cbd5ccd56b7e6151b8e6d68 (diff)
downloadFreeBSD-src-afae46b0e1e77310e1f398e11cb333784311fdfa.zip
FreeBSD-src-afae46b0e1e77310e1f398e11cb333784311fdfa.tar.gz
MFC r293244: Introduce and use new EFI_ERROR_CODE macro for EFI errors
Diffstat (limited to 'sys/boot/efi/loader')
-rw-r--r--sys/boot/efi/loader/bootinfo.c7
-rw-r--r--sys/boot/efi/loader/copy.c2
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/boot/efi/loader/bootinfo.c b/sys/boot/efi/loader/bootinfo.c
index f3bb9cc..18837f8 100644
--- a/sys/boot/efi/loader/bootinfo.c
+++ b/sys/boot/efi/loader/bootinfo.c
@@ -275,7 +275,7 @@ bi_load_efi_data(struct preloaded_file *kfp)
pages, &addr);
if (EFI_ERROR(status)) {
printf("%s: AllocatePages error %lu\n", __func__,
- (unsigned long)(status & ~EFI_ERROR_MASK));
+ EFI_ERROR_CODE(status));
return (ENOMEM);
}
@@ -291,7 +291,7 @@ bi_load_efi_data(struct preloaded_file *kfp)
status = BS->GetMemoryMap(&sz, mm, &efi_mapkey, &mmsz, &mmver);
if (EFI_ERROR(status)) {
printf("%s: GetMemoryMap error %lu\n", __func__,
- (unsigned long)(status & ~EFI_ERROR_MASK));
+ EFI_ERROR_CODE(status));
return (EINVAL);
}
status = BS->ExitBootServices(IH, efi_mapkey);
@@ -305,8 +305,7 @@ bi_load_efi_data(struct preloaded_file *kfp)
}
BS->FreePages(addr, pages);
}
- printf("ExitBootServices error %lu\n",
- (unsigned long)(status & ~EFI_ERROR_MASK));
+ printf("ExitBootServices error %lu\n", EFI_ERROR_CODE(status));
return (EINVAL);
}
diff --git a/sys/boot/efi/loader/copy.c b/sys/boot/efi/loader/copy.c
index a7d6bf1..363d95d 100644
--- a/sys/boot/efi/loader/copy.c
+++ b/sys/boot/efi/loader/copy.c
@@ -56,7 +56,7 @@ efi_copy_init(void)
STAGE_PAGES, &staging);
if (EFI_ERROR(status)) {
printf("failed to allocate staging area: %lu\n",
- (unsigned long)(status & EFI_ERROR_MASK));
+ EFI_ERROR_CODE(status));
return (status);
}
staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE;
OpenPOWER on IntegriCloud