summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/efiauthenticated.h6
-rw-r--r--include/test.mk7
-rw-r--r--test.c17
3 files changed, 8 insertions, 22 deletions
diff --git a/include/efiauthenticated.h b/include/efiauthenticated.h
index f2bcefdb..d5c3204f 100644
--- a/include/efiauthenticated.h
+++ b/include/efiauthenticated.h
@@ -124,9 +124,15 @@ typedef struct {
/*
* Attributes of Authenticated Variable
*/
+#ifndef EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
+#endif
+#ifndef EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS
#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
+#endif
+#ifndef EFI_VARIABLE_APPEND_WRITE
#define EFI_VARIABLE_APPEND_WRITE 0x00000040
+#endif
/*
* AuthInfo is a WIN_CERTIFICATE using the wCertificateType
diff --git a/include/test.mk b/include/test.mk
index c11d0c74..60a7e6fa 100644
--- a/include/test.mk
+++ b/include/test.mk
@@ -67,10 +67,7 @@ $(wildcard test-*.c) :: %.c : test-random.h
$(patsubst %.c,%,$(wildcard test-*.c)) :: | test-random.h
$(patsubst %.c,%.o,$(wildcard test-*.c)) : | test-random.h
-test-load-options_FILES = lib/guid.c \
- libefi-test.a \
- -lefivar
-test-load-options :: libefi-test.a
+test-load-options_FILES = lib/guid.c
test-load-options : CFLAGS+=-DHAVE_SHIM_LOCK_GUID
test-sbat_FILES = csv.c lib/variables.c lib/guid.c
@@ -83,7 +80,7 @@ tests := $(patsubst %.c,%,$(wildcard test-*.c))
$(tests) :: test-% : | libefi-test.a
$(tests) :: test-% : test.c test-%.c $(test-%_FILES)
- $(CC) $(CFLAGS) -o $@ $^ $(wildcard $*.c) $(test-$*_FILES) libefi-test.a
+ $(CC) $(CFLAGS) -o $@ $^ $(wildcard $*.c) $(test-$*_FILES) libefi-test.a -lefivar
$(VALGRIND) ./$@
test : $(tests)
diff --git a/test.c b/test.c
index d9902ebc..39725a72 100644
--- a/test.c
+++ b/test.c
@@ -122,23 +122,6 @@ LogError_(const char *file, int line, const char *func, const CHAR16 *fmt, ...)
return EFI_SUCCESS;
}
-#ifndef HAVE_GET_VARIABLE_ATTR
-EFI_STATUS
-get_variable_attr(const CHAR16 * const var, UINT8 **data, UINTN *len,
- EFI_GUID owner, UINT32 *attributes)
-{
- return EFI_UNSUPPORTED;
-}
-#endif
-
-#ifndef HAVE_GET_VARIABLE
-EFI_STATUS
-get_variable(const CHAR16 * const var, UINT8 **data, UINTN *len, EFI_GUID owner)
-{
- return get_variable_attr(var, data, len, owner, NULL);
-}
-#endif
-
#ifndef HAVE_SHIM_LOCK_GUID
EFI_GUID SHIM_LOCK_GUID = {0x605dab50, 0xe046, 0x4300, {0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 } };
#endif