From 25f9e31d127f5ea7295b9d4486abeb26af9a60b9 Mon Sep 17 00:00:00 2001 From: marius Date: Mon, 4 Apr 2016 12:21:04 +0000 Subject: MFC: r292563 loader.efi: strip trailing whitespace MFC: r293244 (remainder missing in r294275) Introduce and use new EFI_ERROR_CODE macro for EFI errors --- sys/boot/efi/loader/arch/amd64/framebuffer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/boot/efi/loader/arch/amd64/framebuffer.c') diff --git a/sys/boot/efi/loader/arch/amd64/framebuffer.c b/sys/boot/efi/loader/arch/amd64/framebuffer.c index c7ced1b..d861ee4 100644 --- a/sys/boot/efi/loader/arch/amd64/framebuffer.c +++ b/sys/boot/efi/loader/arch/amd64/framebuffer.c @@ -180,7 +180,7 @@ efifb_uga_find_pixel(EFI_UGA_DRAW_PROTOCOL *uga, u_int line, printf("No change detected in frame buffer"); fail: - printf(" -- error %lu\n", status & ~EFI_ERROR_MASK); + printf(" -- error %lu\n", EFI_ERROR_CODE(status)); free(data1); return (-1); } @@ -305,7 +305,7 @@ efifb_from_uga(struct efi_fb *efifb, EFI_UGA_DRAW_PROTOCOL *uga) * offset within the frame buffer of the visible region, nor * the stride. Our only option is to look at the system and * fill in the blanks based on that. Luckily, UGA was mostly - * only used on Apple hardware. + * only used on Apple hardware. */ offset = -1; ev = getenv("smbios.system.maker"); @@ -475,7 +475,7 @@ command_gop(int argc, char *argv[]) status = BS->LocateProtocol(&gop_guid, NULL, (VOID **)&gop); if (EFI_ERROR(status)) { sprintf(command_errbuf, "%s: Graphics Output Protocol not " - "present (error=%lu)", argv[0], status & ~EFI_ERROR_MASK); + "present (error=%lu)", argv[0], EFI_ERROR_CODE(status)); return (CMD_ERROR); } @@ -496,7 +496,7 @@ command_gop(int argc, char *argv[]) if (EFI_ERROR(status)) { sprintf(command_errbuf, "%s: Unable to set mode to " "%u (error=%lu)", argv[0], mode, - status & ~EFI_ERROR_MASK); + EFI_ERROR_CODE(status)); return (CMD_ERROR); } } else if (!strcmp(argv[1], "get")) { @@ -543,7 +543,7 @@ command_uga(int argc, char *argv[]) status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); if (EFI_ERROR(status)) { sprintf(command_errbuf, "%s: UGA Protocol not present " - "(error=%lu)", argv[0], status & ~EFI_ERROR_MASK); + "(error=%lu)", argv[0], EFI_ERROR_CODE(status)); return (CMD_ERROR); } -- cgit v1.1