aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-12-02 20:44:38 +0300
committerJoursoir <chat@joursoir.net>2021-12-02 20:44:38 +0300
commit74063c05b85805fd0532b2a726a0a1b9b0f979f1 (patch)
tree7c8c00cd39a990f779244de5d67ca4b48ae5ff09
parentaa12cd611adabc46889f73f3fec78d0dcef77c34 (diff)
downloadufm-74063c05b85805fd0532b2a726a0a1b9b0f979f1.tar.gz
ufm-74063c05b85805fd0532b2a726a0a1b9b0f979f1.tar.bz2
ufm-74063c05b85805fd0532b2a726a0a1b9b0f979f1.zip
main: add constructor and destructor
-rw-r--r--Library/UefiShellUfmCommandLib/UefiShellUfmCommandLib.c31
1 files changed, 31 insertions, 0 deletions
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;
+}