]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.c
ShellPkg/tftp: Convert from NULL class library to Dynamic Command
[mirror_edk2.git] / ShellPkg / Library / UefiShellTftpCommandLib / UefiShellTftpCommandLib.c
diff --git a/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.c b/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.c
deleted file mode 100644 (file)
index 22c81b8..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/** @file\r
-  Main file for NULL named library for 'tftp' Shell command functions.\r
-\r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. <BR>\r
-  Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>\r
-\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-#include "UefiShellTftpCommandLib.h"\r
-\r
-CONST CHAR16 gShellTftpFileName[] = L"ShellCommand";\r
-EFI_HANDLE gShellTftpHiiHandle = NULL;\r
-\r
-/**\r
-  Return the file name of the help text file if not using HII.\r
-\r
-  @return The string pointer to the file name.\r
-**/\r
-CONST CHAR16*\r
-EFIAPI\r
-ShellCommandGetManFileNameTftp (\r
-  VOID\r
-  )\r
-{\r
-  return gShellTftpFileName;\r
-}\r
-\r
-/**\r
-  Constructor for the Shell Tftp Command library.\r
-\r
-  Install the handlers for Tftp UEFI Shell command.\r
-\r
-  @param ImageHandle            The image handle of the process.\r
-  @param SystemTable            The EFI System Table pointer.\r
-\r
-  @retval EFI_SUCCESS           The Shell command handlers were installed sucessfully.\r
-  @retval EFI_UNSUPPORTED       The Shell level required was not found.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ShellTftpCommandLibConstructor (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-{\r
-  gShellTftpHiiHandle = NULL;\r
-\r
-  //\r
-  // check our bit of the profiles mask\r
-  //\r
-  if ((PcdGet8 (PcdShellProfileMask) & BIT3) == 0) {\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  gShellTftpHiiHandle = HiiAddPackages (\r
-                          &gShellTftpHiiGuid, gImageHandle,\r
-                          UefiShellTftpCommandLibStrings, NULL\r
-                          );\r
-  if (gShellTftpHiiHandle == NULL) {\r
-    return EFI_DEVICE_ERROR;\r
-  }\r
-  //\r
-  // Install our Shell command handler\r
-  //\r
-  ShellCommandRegisterCommandName (\r
-     L"tftp", ShellCommandRunTftp, ShellCommandGetManFileNameTftp, 0,\r
-     L"tftp", TRUE , gShellTftpHiiHandle, STRING_TOKEN (STR_GET_HELP_TFTP)\r
-     );\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
-  Destructor for the library.  free any resources.\r
-\r
-  @param ImageHandle            The image handle of the process.\r
-  @param SystemTable            The EFI System Table pointer.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ShellTftpCommandLibDestructor (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-{\r
-  if (gShellTftpHiiHandle != NULL) {\r
-    HiiRemovePackages (gShellTftpHiiHandle);\r
-  }\r
-  return EFI_SUCCESS;\r
-}\r