Skip to content

Commit

Permalink
test.h: add some decls for some of the stuff in efilib.h
Browse files Browse the repository at this point in the history
In some test cases, it's useful to be able to call some of the very
common stuff in gnu-efi's efilib.h (i.e. CompareGuid()), but including
that header itself is too big for me to tackle right now.

This patch adds a few more decls to test.h.

Signed-off-by: Peter Jones <pjones@redhat.com>
  • Loading branch information
vathpela committed Jul 20, 2021
1 parent 3269735 commit 5f08e67
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@
#define FreePool(x) free(x)
#define ReallocatePool(old, oldsz, newsz) realloc(old, newsz)

INTN StrnCmp(IN CONST CHAR16 *s1,
IN CONST CHAR16 *s2,
IN UINTN len);
CHAR16 *StrDuplicate(IN CONST CHAR16 *Src);
UINTN StrLen(IN CONST CHAR16 *s1);
UINTN StrSize(IN CONST CHAR16 *s1);
VOID StrCat(IN CHAR16 *Dest, IN CONST CHAR16 *Src);
CHAR16 *DevicePathToStr(EFI_DEVICE_PATH *DevPath);

#define CompareGuid(a, b) memcmp(a, b, sizeof(a))

extern int debug;
#ifdef dprint
#undef dprint
Expand Down

0 comments on commit 5f08e67

Please sign in to comment.