Skip to content

Commit

Permalink
Maybe this fixes centos-7-x64?
Browse files Browse the repository at this point in the history
  • Loading branch information
vathpela committed Aug 17, 2021
1 parent edc983d commit b5aaa38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
7 changes: 7 additions & 0 deletions include/hexdump.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b5aaa38

Please sign in to comment.