aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-12-22 19:22:03 +0300
committerJoursoir <chat@joursoir.net>2021-12-22 19:22:11 +0300
commit9c4be23a0c023ad343c61df08f6f1b995cb99894 (patch)
treef4a483b96678ce150f761cc9a0eb4d333bf25582
parent2795562506dfc9f1d68d75faf7f0942bf4417c33 (diff)
downloadufm-9c4be23a0c023ad343c61df08f6f1b995cb99894.tar.gz
ufm-9c4be23a0c023ad343c61df08f6f1b995cb99894.tar.bz2
ufm-9c4be23a0c023ad343c61df08f6f1b995cb99894.zip
ufm: check UEFI Shell version
-rw-r--r--Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c b/Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c
index d08298a..b5d4f38 100644
--- a/Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c
+++ b/Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c
@@ -112,6 +112,10 @@ SHELL_STATUS EFIAPI ShellCommandRunUFM(
SHELL_STATUS status = SHELL_LOAD_ERROR;
BOOLEAN res;
+ // Check for UEFI Shell 2.0 protocol
+ if(!gEfiShellProtocol)
+ return SHELL_UNSUPPORTED;
+
res = prepare_context();
if(res) {
do_ec();