summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-07-15 10:07:14 -0400
committerPeter Jones <pjones@redhat.com>2021-07-20 09:44:25 -0400
commitf1ef8dffd374048fbf8dd584923c42e5a784bbf2 (patch)
tree35ee16b58ae76044c44ec0aed27b000d5174ff52 /test.c
parentb092c85fc3e9caec83728b244a34ed8325a02c6d (diff)
downloadefi-boot-shim-f1ef8dffd374048fbf8dd584923c42e5a784bbf2.tar.gz
efi-boot-shim-f1ef8dffd374048fbf8dd584923c42e5a784bbf2.zip
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 <pjones@redhat.com>
Diffstat (limited to 'test.c')
-rw-r--r--test.c37
1 files changed, 6 insertions, 31 deletions
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