summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/console.h4
-rw-r--r--include/hexdump.h7
2 files changed, 11 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h
index f56b1231..c832b20e 100644
--- a/include/console.h
+++ b/include/console.h
@@ -109,8 +109,12 @@ extern UINT32 verbose;
extern EFI_STATUS EFIAPI vdprint_(const CHAR16 *fmt, const char *file, int line,
const char *func, ms_va_list args);
+#if defined(SHIM_UNIT_TEST)
+#define vdprint(fmt, ...)
+#else
#define vdprint(fmt, ...) \
vdprint_(fmt, __FILE__, __LINE__ - 1, __func__, ##__VA_ARGS__)
+#endif
extern EFI_STATUS print_crypto_errors(EFI_STATUS rc, char *file, const char *func, int line);
#define crypterr(rc) print_crypto_errors((rc), __FILE__, __func__, __LINE__)
diff --git a/include/hexdump.h b/include/hexdump.h
index 381e1a68..1a20339b 100644
--- a/include/hexdump.h
+++ b/include/hexdump.h
@@ -137,12 +137,19 @@ hexdumpat(const char *file, int line, const char *func, const void *data, unsign
hexdumpf(file, line, func, L"", data, size, at);
}
+#if defined(SHIM_UNIT_TEST)
+#define LogHexDump(data, ...)
+#define dhexdump(data, ...)
+#define dhexdumpat(data, ...)
+#define dhexdumpf(fmt, ...)
+#else
#define LogHexdump(data, sz) LogHexdump_(__FILE__, __LINE__, __func__, data, sz)
#define dhexdump(data, sz) hexdump(__FILE__, __LINE__, __func__, data, sz)
#define dhexdumpat(data, sz, at) \
hexdumpat(__FILE__, __LINE__ - 1, __func__, data, sz, at)
#define dhexdumpf(fmt, data, sz, at, ...) \
hexdumpf(__FILE__, __LINE__ - 1, __func__, fmt, data, sz, at, ##__VA_ARGS__)
+#endif
#endif /* STATIC_HEXDUMP_H */
// vim:fenc=utf-8:tw=75:noet