2 Provides interface to shell functionality for shell commands and applications.
4 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef _UEFI_SHELL_LIB_INTERNAL_H_
11 #define _UEFI_SHELL_LIB_INTERNAL_H_
15 #include <Guid/FileInfo.h>
17 #include <Protocol/SimpleFileSystem.h>
18 #include <Protocol/LoadedImage.h>
19 #include <Protocol/EfiShellInterface.h>
20 #include <Protocol/EfiShellEnvironment2.h>
21 #include <Protocol/Shell.h>
22 #include <Protocol/ShellParameters.h>
23 #include <Protocol/UnicodeCollation.h>
25 #include <Library/UefiBootServicesTableLib.h>
26 #include <Library/BaseLib.h>
27 #include <Library/BaseMemoryLib.h>
28 #include <Library/DebugLib.h>
29 #include <Library/MemoryAllocationLib.h>
30 #include <Library/DevicePathLib.h>
31 #include <Library/PcdLib.h>
32 #include <Library/FileHandleLib.h>
33 #include <Library/PrintLib.h>
34 #include <Library/UefiLib.h>
35 #include <Library/HiiLib.h>
36 #include <Library/ShellLib.h>
39 EFI_SHELL_GET_FILE_INFO GetFileInfo
;
40 EFI_SHELL_SET_FILE_INFO SetFileInfo
;
41 EFI_SHELL_READ_FILE ReadFile
;
42 EFI_SHELL_WRITE_FILE WriteFile
;
43 EFI_SHELL_CLOSE_FILE CloseFile
;
44 EFI_SHELL_DELETE_FILE DeleteFile
;
45 EFI_SHELL_GET_FILE_POSITION GetFilePosition
;
46 EFI_SHELL_SET_FILE_POSITION SetFilePosition
;
47 EFI_SHELL_FLUSH_FILE FlushFile
;
48 EFI_SHELL_GET_FILE_SIZE GetFileSize
;
49 } FILE_HANDLE_FUNCTION_MAP
;
52 Function to determin if an entire string is a valid number.
54 If Hex it must be preceeded with a 0x or has ForceHex, set TRUE.
56 @param[in] String The string to evaluate.
57 @param[in] ForceHex TRUE - always assume hex.
58 @param[in] StopAtSpace TRUE to halt upon finding a space, FALSE to keep going.
59 @param[in] TimeNumbers TRUE to allow numbers with ":", FALSE otherwise.
61 @retval TRUE It is all numeric (dec/hex) characters.
62 @retval FALSE There is a non-numeric character.
65 InternalShellIsHexOrDecimalNumber (
66 IN CONST CHAR16
*String
,
67 IN CONST BOOLEAN ForceHex
,
68 IN CONST BOOLEAN StopAtSpace
,
69 IN CONST BOOLEAN TimeNumbers
73 Cleans off all the quotes in the string.
75 @param[in] OriginalString pointer to the string to be cleaned.
76 @param[out] CleanString The new string with all quotes removed.
77 Memory allocated in the function and free
80 @retval EFI_SUCCESS The operation was successful.
83 InternalShellStripQuotes (
84 IN CONST CHAR16
*OriginalString
,
85 OUT CHAR16
**CleanString