aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <JBottomley@Parallels.com>2013-03-05 10:35:41 +0000
committerJames Bottomley <JBottomley@Parallels.com>2013-03-05 10:35:41 +0000
commit804903d6ed2aa10b900f14f920042f74a1112f8d (patch)
tree0ef2fb6cc604fa9718aeb117bb57906ae511028d
parent02cb121f04aa96f58c166d00537b11899c900334 (diff)
downloadefitools-804903d6ed2aa10b900f14f920042f74a1112f8d.tar.gz
PreLoader: add keystroke check to start HashTool
This adds a no wait keystroke check to PreLoader. If you boot up and hold down the 'H' key, it will automatically start HashTool even if the hash of the loader is already enrolled. Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--PreLoader.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/PreLoader.c b/PreLoader.c
index dd06dcf..b9cea32 100644
--- a/PreLoader.c
+++ b/PreLoader.c
@@ -53,6 +53,10 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
/* install statically compiled in hashes */
security_protocol_set_hashes(_tmp_tmp_hash, _tmp_tmp_hash_len);
+ /* Check for H key being pressed */
+ if (console_check_for_keystroke('H'))
+ goto start_hashtool;
+
status = execute(image, loader);
if (status == EFI_SUCCESS)
@@ -79,6 +83,7 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
});
for (;;) {
+ start_hashtool:
status = execute(image, hashtool);
if (status != EFI_SUCCESS) {