summaryrefslogtreecommitdiff
path: root/shim.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-03-12 16:03:38 +0100
committerPeter Jones <pjones@redhat.com>2018-03-12 18:00:41 -0400
commit1fe31ee1b4ebf2f177d512d0301e11de0689a275 (patch)
tree50f082d81f6cab93b9394328c40f005e79e0f256 /shim.h
parentd3b7ba1b09e64c0c17afc48270e38c364ded2cb0 (diff)
downloadefi-boot-shim-1fe31ee1b4ebf2f177d512d0301e11de0689a275.tar.gz
efi-boot-shim-1fe31ee1b4ebf2f177d512d0301e11de0689a275.zip
console: Add console_print and console_print_at helpers
This is a preparation commit for removing the setup_console(1) calls from MokManager and shim so that we don't force the EFI console to switch to text-mode. This commit replaces all direct calls to Print / PrintAt with calls to the new helpers (no functional changes) so that we can delay calling setup_console(1) till the first Print call in a follow-up patch. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'shim.h')
-rw-r--r--shim.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/shim.h b/shim.h
index 4079ef8f..a25a660d 100644
--- a/shim.h
+++ b/shim.h
@@ -175,12 +175,12 @@ extern UINT8 user_insecure_mode;
extern UINT8 ignore_db;
extern UINT8 in_protocol;
-#define perror_(file, line, func, fmt, ...) ({ \
- UINTN __perror_ret = 0; \
- if (!in_protocol) \
- __perror_ret = Print((fmt), ##__VA_ARGS__); \
+#define perror_(file, line, func, fmt, ...) ({ \
+ UINTN __perror_ret = 0; \
+ if (!in_protocol) \
+ __perror_ret = console_print((fmt), ##__VA_ARGS__); \
LogError_(file, line, func, fmt, ##__VA_ARGS__); \
- __perror_ret; \
+ __perror_ret; \
})
#define perror(fmt, ...) perror_(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__)
#define LogError(fmt, ...) LogError_(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__)