summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--fallback.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 45db2b58..48db1af6 100644
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,10 @@ ifneq ($(origin FALLBACK_VERBOSE), undefined)
CFLAGS += -DFALLBACK_VERBOSE
endif
+ifneq ($(origin FALLBACK_NONINTERACTIVE), undefined)
+ CFLAGS += -DFALLBACK_NONINTERACTIVE
+endif
+
ifneq ($(origin FALLBACK_VERBOSE_WAIT), undefined)
CFLAGS += -DFALLBACK_VERBOSE_WAIT=$(FALLBACK_VERBOSE_WAIT)
endif
diff --git a/fallback.c b/fallback.c
index 801955c7..302eeac1 100644
--- a/fallback.c
+++ b/fallback.c
@@ -1041,6 +1041,7 @@ get_fallback_no_reboot(void)
return 0;
}
+#ifndef FALLBACK_NONINTERACTIVE
static EFI_STATUS
set_fallback_no_reboot(void)
{
@@ -1084,6 +1085,7 @@ get_user_choice(void)
return choice;
}
+#endif
extern EFI_STATUS
efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab);
@@ -1156,6 +1158,7 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
try_start_first_option(image);
}
+#ifndef FALLBACK_NONINTERACTIVE
int timeout = draw_countdown();
if (timeout == 0)
goto reset;
@@ -1171,6 +1174,7 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
VerbosePrint(L"tpm present, starting the first image\n");
try_start_first_option(image);
reset:
+#endif
VerbosePrint(L"tpm present, resetting system\n");
}