aboutsummaryrefslogtreecommitdiff
path: root/sys/boot
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2017-02-03 16:39:10 +0000
committerToomas Soome <tsoome@FreeBSD.org>2017-02-03 16:39:10 +0000
commitbfe9bdb06352bab235797f23ad88e2009ceed408 (patch)
tree91313f350548550674564ad0afc50e37d103247a /sys/boot
parent27f134b64ae20c1f50fa9249135f50ad6f002aee (diff)
downloadsrc-bfe9bdb06352bab235797f23ad88e2009ceed408.tar.gz
src-bfe9bdb06352bab235797f23ad88e2009ceed408.zip
loader: libefi/env.c warnings in arm build
The arm build has revealed some of the warnings, the fix for CHAR16 warning is to switch the warning off for env.c (same as for efinet.c). For error code we need to use macro. Reported by: gjb Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D9422
Notes
Notes: svn path=/head/; revision=313166
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/efi/libefi/Makefile1
-rw-r--r--sys/boot/efi/libefi/env.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/boot/efi/libefi/Makefile b/sys/boot/efi/libefi/Makefile
index 441aa734fd9e..7f22dc4a8f40 100644
--- a/sys/boot/efi/libefi/Makefile
+++ b/sys/boot/efi/libefi/Makefile
@@ -26,6 +26,7 @@ SRCS+= time_event.c
# of a short. There's no good cast to use here so just ignore the
# warnings for now.
CWARNFLAGS.efinet.c+= -Wno-format
+CWARNFLAGS.env.c+= -Wno-format
.if ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -msoft-float -mgeneral-regs-only
diff --git a/sys/boot/efi/libefi/env.c b/sys/boot/efi/libefi/env.c
index 139b91a08660..ceec7b2a18f8 100644
--- a/sys/boot/efi/libefi/env.c
+++ b/sys/boot/efi/libefi/env.c
@@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag)
status = RS->GetVariable(varnamearg, matchguid, &attr,
&datasz, NULL);
if (status != EFI_BUFFER_TOO_SMALL) {
- printf("Can't get the variable: error %#lx\n", status);
+ printf("Can't get the variable: error %#lx\n",
+ EFI_ERROR_CODE(status));
return (CMD_ERROR);
}
data = malloc(datasz);
status = RS->GetVariable(varnamearg, matchguid, &attr,
&datasz, data);
if (status != EFI_SUCCESS) {
- printf("Can't get the variable: error %#lx\n", status);
+ printf("Can't get the variable: error %#lx\n",
+ EFI_ERROR_CODE(status));
return (CMD_ERROR);
}
uuid_to_string((uuid_t *)matchguid, &str, &uuid_status);