]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Library/ShellCommandLib.h
ShellPkg: Move UpdateMapping() out of Map command and added to UefiShellCommandLib...
[mirror_edk2.git] / ShellPkg / Include / Library / ShellCommandLib.h
index 5bc03ce256cc20f45526d95fa068f1621add7cb2..aed947c1a9814ddb62a842b8df12923e05258cb0 100644 (file)
@@ -4,7 +4,8 @@
   This library is for use ONLY by shell commands linked into the shell application.\r
   This library will not funciton if it is used for UEFI Shell 2.0 Applications.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2013-2014, Hewlett-Packard Development Company, L.P.\r
+  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\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
@@ -24,7 +25,6 @@
 #include <Protocol/EfiShell.h>\r
 #include <Protocol/EfiShellParameters.h>\r
 #include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/DevicePathToText.h>\r
 #include <Protocol/SimpleFileSystem.h>\r
 \r
 #include <Library/UefiBootServicesTableLib.h>\r
@@ -33,7 +33,6 @@
 // The extern global protocol poionters.\r
 //\r
 extern        EFI_UNICODE_COLLATION_PROTOCOL    *gUnicodeCollation;\r
-extern        EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *gDevPathToText;\r
 extern        CONST CHAR16*                     SupportLevel[];\r
 \r
 //\r
@@ -159,12 +158,12 @@ ShellCommandRegisterCommandName (
   information is returned. If Sections is NULL, then all help text information\r
   available is returned.\r
 \r
-  @param[in]  CommandString         The pointer to the command name.  This is the name\r
-                                    found on the command line in the shell.\r
-  @param[in,out] RetVal             The pointer to the return value from the command handler.\r
+  @param[in]   CommandString         The pointer to the command name.  This is the name\r
+                                     found on the command line in the shell.\r
+  @param[in, out] RetVal             The pointer to the return value from the command handler.\r
 \r
-  @param[in,out]  CanAffectLE       Indicates whether this command's return value\r
-                                    needs to be placed into LASTERROR environment variable.\r
+  @param[in, out]  CanAffectLE       Indicates whether this command's return value\r
+                                     needs to be placed into LASTERROR environment variable.\r
 \r
   @retval RETURN_SUCCESS            The handler was run.\r
   @retval RETURN_NOT_FOUND          The CommandString did not match a registered\r
@@ -340,11 +339,24 @@ ShellCommandSetEchoState (
   Indicate that the current shell or script should exit.\r
 \r
   @param[in] ScriptOnly   TRUE if exiting a script; FALSE otherwise.\r
+  @param[in] ErrorCode    The 64 bit error code to return.\r
 **/\r
 VOID\r
 EFIAPI\r
 ShellCommandRegisterExit (\r
-  IN BOOLEAN ScriptOnly\r
+  IN BOOLEAN      ScriptOnly,\r
+  IN CONST UINT64 ErrorCode\r
+  );\r
+\r
+/**\r
+  Retrieve the Exit code.\r
+\r
+  @return the value passed into RegisterExit.\r
+**/\r
+UINT64\r
+EFIAPI\r
+ShellCommandGetExitCode (\r
+  VOID\r
   );\r
 \r
 /**\r
@@ -572,6 +584,17 @@ ShellCommandCreateInitialMappingsAndPaths(
   VOID\r
   );\r
 \r
+/**\r
+  Add mappings for any devices without one.  Do not change any existing maps.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ShellCommandUpdateMapping (\r
+  VOID\r
+  );\r
+\r
 /**\r
   Converts a SHELL_FILE_HANDLE to an EFI_FILE_PROTOCOL*.\r
 \r