From f1ef8dffd374048fbf8dd584923c42e5a784bbf2 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 15 Jul 2021 10:07:14 -0400 Subject: Make test cases link against libefi.a This allows us to use library functions from libefi.a in our test programs. Signed-off-by: Peter Jones --- test.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) (limited to 'test.c') diff --git a/test.c b/test.c index 9da5cf5b..11e0c642 100644 --- a/test.c +++ b/test.c @@ -22,37 +22,6 @@ LogError_(const char *file, int line, const char *func, const CHAR16 *fmt, ...) return EFI_SUCCESS; } -#ifndef HAVE_STRCMP -INTN -StrCmp(CONST CHAR16 *s1, CONST CHAR16 *s2) { - assert(s1 != NULL); - assert(s2 != NULL); - - int i; - for (i = 0; s1[i] && s2[i]; i++) { - if (s1[i] != s2[i]) - return s2[i] - s1[i]; - } - return 0; -} -#endif - -#ifndef HAVE_STRNCMP -INTN -StrnCmp(CONST CHAR16 *s1, CONST CHAR16 *s2, UINTN len) { - assert(s1 != NULL); - assert(s2 != NULL); - - UINTN i; - for (i = 0; i < len && s1[i] && s2[i]; i++) { - if (s1[i] != s2[i]) - return s2[i] - s1[i]; - - } - return 0; -} -#endif - #ifndef HAVE_GET_VARIABLE_ATTR EFI_STATUS get_variable_attr(const CHAR16 * const var, UINT8 **data, UINTN *len, @@ -74,4 +43,10 @@ get_variable(const CHAR16 * const var, UINT8 **data, UINTN *len, EFI_GUID owner) EFI_GUID SHIM_LOCK_GUID = {0x605dab50, 0xe046, 0x4300, {0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 } }; #endif +UINTN EFIAPI +console_print(const CHAR16 *fmt, ...) +{ + return 0; +} + // vim:fenc=utf-8:tw=75:noet -- cgit v1.2.3