2 Provides interface to shell functionality for shell commands and applications.
4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _UEFI_SHELL_LIB_INTERNAL_H_
16 #define _UEFI_SHELL_LIB_INTERNAL_H_
20 #include <Guid/FileInfo.h>
22 #include <Protocol/SimpleFileSystem.h>
23 #include <Protocol/LoadedImage.h>
24 #include <Protocol/EfiShellInterface.h>
25 #include <Protocol/EfiShellEnvironment2.h>
26 #include <Protocol/EfiShell.h>
27 #include <Protocol/EfiShellParameters.h>
29 #include <Library/UefiBootServicesTableLib.h>
30 #include <Library/BaseLib.h>
31 #include <Library/BaseMemoryLib.h>
32 #include <Library/DebugLib.h>
33 #include <Library/MemoryAllocationLib.h>
34 #include <Library/DevicePathLib.h>
35 #include <Library/PcdLib.h>
36 #include <Library/FileHandleLib.h>
37 #include <Library/PrintLib.h>
38 #include <Library/UefiLib.h>
39 #include <Library/HiiLib.h>
40 #include <Library/ShellLib.h>
43 EFI_SHELL_GET_FILE_INFO GetFileInfo
;
44 EFI_SHELL_SET_FILE_INFO SetFileInfo
;
45 EFI_SHELL_READ_FILE ReadFile
;
46 EFI_SHELL_WRITE_FILE WriteFile
;
47 EFI_SHELL_CLOSE_FILE CloseFile
;
48 EFI_SHELL_DELETE_FILE DeleteFile
;
49 EFI_SHELL_GET_FILE_POSITION GetFilePosition
;
50 EFI_SHELL_SET_FILE_POSITION SetFilePosition
;
51 EFI_SHELL_FLUSH_FILE FlushFile
;
52 EFI_SHELL_GET_FILE_SIZE GetFileSize
;
53 } FILE_HANDLE_FUNCTION_MAP
;
56 Function to determin if an entire string is a valid number.
58 If Hex it must be preceeded with a 0x or has ForceHex, set TRUE.
60 @param[in] String The string to evaluate.
61 @param[in] ForceHex TRUE - always assume hex.
62 @param[in] StopAtSpace TRUE to halt upon finding a space, FALSE to keep going.
64 @retval TRUE It is all numeric (dec/hex) characters.
65 @retval FALSE There is a non-numeric character.
69 InternalShellIsHexOrDecimalNumber (
70 IN CONST CHAR16
*String
,
71 IN CONST BOOLEAN ForceHex
,
72 IN CONST BOOLEAN StopAtSpace