From 9c4be23a0c023ad343c61df08f6f1b995cb99894 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Wed, 22 Dec 2021 19:22:03 +0300 Subject: ufm: check UEFI Shell version --- Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- cgit v1.2.3-18-g5258