From 74063c05b85805fd0532b2a726a0a1b9b0f979f1 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Thu, 2 Dec 2021 20:44:38 +0300 Subject: main: add constructor and destructor --- .../UefiShellUfmCommandLib.c | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c b/Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c index 89dd3aa..fb56e1b 100644 --- a/Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c +++ b/Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c @@ -121,3 +121,34 @@ SHELL_STATUS EFIAPI ShellCommandRunUFM( forget_context(); return status; } + +/** + Return the file name of the help text file if not using HII. +**/ +STATIC CONST CHAR16 *EFIAPI ShellCommandGetManFileNameUfm(VOID) +{ + return L"ShellCommand"; +} + +EFI_STATUS EFIAPI UefiUfmConstructor( + EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) +{ + ShellCommandRegisterCommandName( + L"ufm", + ShellCommandRunUFM, + ShellCommandGetManFileNameUfm, + 0, + L"ufm", + TRUE, + NULL, + STRING_TOKEN(0) + ); + + return EFI_SUCCESS; +} + +EFI_STATUS EFIAPI UefiUfmDestructor( + EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) +{ + return EFI_SUCCESS; +} -- cgit v1.2.3-18-g5258