]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h
Refine comments and two code style.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / UefiShellDebug1CommandsLib.h
index f34889f76d9b1d31a2af16649c7c4d08cad704c1..7cabfe3278d3576737294ab9a3f390a89ad9444d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for NULL named library for Profile1 shell command functions.\r
 \r
-  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2011, 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
 \r
 **/\r
 \r
+#ifndef _UEFI_SHELL_DEBUG1_COMMANDS_LIB_H_\r
+#define _UEFI_SHELL_DEBUG1_COMMANDS_LIB_H_\r
+\r
 #include <Uefi.h>\r
 #include <ShellBase.h>\r
 \r
 #include <Guid/GlobalVariable.h>\r
 #include <Guid/ConsoleInDevice.h>\r
 #include <Guid/ConsoleOutDevice.h>\r
+#include <Guid/FileSystemInfo.h>\r
 \r
 #include <Protocol/EfiShell.h>\r
 #include <Protocol/EfiShellParameters.h>\r
@@ -34,6 +38,8 @@
 #include <Protocol/DriverFamilyOverride.h>\r
 #include <Protocol/DriverHealth.h>\r
 #include <Protocol/DevicePathFromText.h>\r
+#include <Protocol/SimplePointer.h>\r
+#include <Protocol/PciRootBridgeIo.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
@@ -76,8 +82,8 @@ DumpHex (
   Function returns a system configuration table that is stored in the\r
   EFI System Table based on the provided GUID.\r
 \r
-  @param[in]  TableGuid    A pointer to the table's GUID type.\r
-  @param[out] Table        On exit, a pointer to a system configuration table.\r
+  @param[in]   TableGuid    A pointer to the table's GUID type.\r
+  @param[in, out] Table     On exit, a pointer to a system configuration table.\r
 \r
   @retval EFI_SUCCESS      A configuration table matching TableGuid was found.\r
   @retval EFI_NOT_FOUND    A configuration table matching TableGuid was not found.\r
@@ -92,8 +98,8 @@ GetSystemConfigurationTable (
 /**\r
   Convert a string representation of a GUID to the GUID value.\r
 \r
-  @param[in] StringGuid   The pointer to the string containing a GUID printed.\r
-  @param[in,out] Guid     The pointer to the buffer to get the GUID value.\r
+  @param[in]  StringGuid   The pointer to the string containing a GUID printed.\r
+  @param[in, out] Guid     The pointer to the buffer to get the GUID value.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -329,4 +335,104 @@ ShellCommandRunDblk (
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   );\r
 \r
+/**\r
+  Function for 'edit' command.\r
+\r
+  @param[in] ImageHandle  Handle to the Image (NULL if Internal).\r
+  @param[in] SystemTable  Pointer to the System Table (NULL if Internal).\r
+**/\r
+SHELL_STATUS\r
+EFIAPI\r
+ShellCommandRunEdit (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  );\r
+\r
+/**\r
+  Function for 'hexedit' command.\r
+\r
+  @param[in] ImageHandle  Handle to the Image (NULL if Internal).\r
+  @param[in] SystemTable  Pointer to the System Table (NULL if Internal).\r
+**/\r
+SHELL_STATUS\r
+EFIAPI\r
+ShellCommandRunHexEdit (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  );\r
+\r
+/**\r
+  Clear the line at the specified Row.\r
+  \r
+  @param[in] Row                The row number to be cleared ( start from 1 )\r
+  @param[in] LastCol            The last printable column.\r
+  @param[in] LastRow            The last printable row.\r
+**/\r
+VOID\r
+EFIAPI\r
+EditorClearLine (\r
+  IN UINTN Row,\r
+  IN UINTN LastCol,\r
+  IN UINTN LastRow\r
+  );\r
+\r
+/**\r
+  Check if file name has illegal characters.\r
+  \r
+  @param Name       The filename to check.\r
+\r
+  @retval TRUE      The filename is ok.\r
+  @retval FALSE     The filename is not ok.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsValidFileName (\r
+  IN CONST CHAR16 *Name\r
+  );\r
+\r
+/**\r
+  Find a filename that is valid (not taken) with the given extension.\r
+\r
+  @param[in] Extension      The file extension.\r
+\r
+  @retval NULL  Something went wrong.\r
+  @return the valid filename.\r
+**/\r
+CHAR16 *\r
+EFIAPI\r
+EditGetDefaultFileName (\r
+  IN CONST CHAR16 *Extension\r
+  );\r
+\r
+/**\r
+  Read a file into an allocated buffer.  The buffer is the responsibility \r
+  of the caller to free.\r
+\r
+  @param[in]  FileName          The filename of the file to open.\r
+  @param[out] Buffer            Upon successful return, the pointer to the \r
+                                address of the allocated buffer.                                  \r
+  @param[out] BufferSize        If not NULL, then the pointer to the size\r
+                                of the allocated buffer.\r
+  @param[out] ReadOnly          Upon successful return TRUE if the file is\r
+                                read only.  FALSE otherwise.\r
+\r
+  @retval EFI_NOT_FOUND         The filename did not represent a file in the \r
+                                file system.  Directories cannot be read with\r
+                                this method.\r
+  @retval EFI_SUCCESS           The file was read into the buffer.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        The file read operation failed.\r
+  @retval EFI_INVALID_PARAMETER A parameter was invalid.\r
+  @retval EFI_INVALID_PARAMETER FileName was NULL.\r
+  @retval EFI_INVALID_PARAMETER FileName was a directory.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ReadFileIntoBuffer (\r
+  IN CONST CHAR16 *FileName,\r
+  OUT VOID        **Buffer,\r
+  OUT UINTN       *BufferSize OPTIONAL,\r
+  OUT BOOLEAN     *ReadOnly\r
+  );\r
 \r
+#endif\r