summaryrefslogtreecommitdiff
path: root/include/console.h
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-03-09 11:56:31 -0500
committerPeter Jones <pjones@redhat.com>2021-03-10 15:54:20 -0500
commitbbdfa72a0a5f8d5a8dd4a47e67195504a22ece5b (patch)
treedf55ee07b51932f866a25967b18536dc29321073 /include/console.h
parent9beca885c29c77bb901547321a5ce6fd3c9c8ee3 (diff)
downloadefi-boot-shim-bbdfa72a0a5f8d5a8dd4a47e67195504a22ece5b.tar.gz
efi-boot-shim-bbdfa72a0a5f8d5a8dd4a47e67195504a22ece5b.zip
Add some test cases, and make "make test" actually work.
Note the one test case I'm not 100% sure about. Someone let me know. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'include/console.h')
-rw-r--r--include/console.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h
index 00982744..036262ef 100644
--- a/include/console.h
+++ b/include/console.h
@@ -92,6 +92,7 @@ struct _EFI_CONSOLE_CONTROL_PROTOCOL {
extern VOID console_fini(VOID);
extern VOID setup_verbosity(VOID);
extern UINT32 verbose;
+#ifndef SHIM_UNIT_TEST
#define dprint_(fmt, ...) ({ \
UINTN __dprint_ret = 0; \
if (verbose) \
@@ -101,6 +102,11 @@ extern UINT32 verbose;
#define dprint(fmt, ...) \
dprint_(L"%a:%d:%a() " fmt, __FILE__, __LINE__ - 1, __func__, \
##__VA_ARGS__)
+#else
+#define dprint_(...)
+#define dprint(fmt, ...)
+#endif
+
extern EFI_STATUS EFIAPI vdprint_(const CHAR16 *fmt, const char *file, int line,
const char *func, va_list args);
#define vdprint(fmt, ...) \