summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Include/Library/ShellLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Include/Library/ShellLib.h')
-rw-r--r--ShellPkg/Include/Library/ShellLib.h299
1 files changed, 149 insertions, 150 deletions
diff --git a/ShellPkg/Include/Library/ShellLib.h b/ShellPkg/Include/Library/ShellLib.h
index ed9b8f9105..10cf7f4fef 100644
--- a/ShellPkg/Include/Library/ShellLib.h
+++ b/ShellPkg/Include/Library/ShellLib.h
@@ -27,8 +27,8 @@
} \
} while(FALSE)
-extern EFI_SHELL_PARAMETERS_PROTOCOL *gEfiShellParametersProtocol;
-extern EFI_SHELL_PROTOCOL *gEfiShellProtocol;
+extern EFI_SHELL_PARAMETERS_PROTOCOL *gEfiShellParametersProtocol;
+extern EFI_SHELL_PROTOCOL *gEfiShellProtocol;
/**
Return a clean, fully-qualified version of an input path. If the return value
@@ -58,10 +58,10 @@ extern EFI_SHELL_PROTOCOL *gEfiShellProtocol;
Path. The caller must free this memory when it is no
longer needed.
**/
-CHAR16*
+CHAR16 *
EFIAPI
-FullyQualifyPath(
- IN CONST CHAR16 *Path
+FullyQualifyPath (
+ IN CONST CHAR16 *Path
);
/**
@@ -78,10 +78,10 @@ FullyQualifyPath(
@return The information about the file.
**/
-EFI_FILE_INFO*
+EFI_FILE_INFO *
EFIAPI
ShellGetFileInfo (
- IN SHELL_FILE_HANDLE FileHandle
+ IN SHELL_FILE_HANDLE FileHandle
);
/**
@@ -106,8 +106,8 @@ ShellGetFileInfo (
EFI_STATUS
EFIAPI
ShellSetFileInfo (
- IN SHELL_FILE_HANDLE FileHandle,
- IN EFI_FILE_INFO *FileInfo
+ IN SHELL_FILE_HANDLE FileHandle,
+ IN EFI_FILE_INFO *FileInfo
);
/**
@@ -141,11 +141,11 @@ ShellSetFileInfo (
**/
EFI_STATUS
EFIAPI
-ShellOpenFileByDevicePath(
- IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath,
- OUT SHELL_FILE_HANDLE *FileHandle,
- IN UINT64 OpenMode,
- IN UINT64 Attributes
+ShellOpenFileByDevicePath (
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath,
+ OUT SHELL_FILE_HANDLE *FileHandle,
+ IN UINT64 OpenMode,
+ IN UINT64 Attributes
);
/**
@@ -179,11 +179,11 @@ ShellOpenFileByDevicePath(
**/
EFI_STATUS
EFIAPI
-ShellOpenFileByName(
- IN CONST CHAR16 *FileName,
- OUT SHELL_FILE_HANDLE *FileHandle,
- IN UINT64 OpenMode,
- IN UINT64 Attributes
+ShellOpenFileByName (
+ IN CONST CHAR16 *FileName,
+ OUT SHELL_FILE_HANDLE *FileHandle,
+ IN UINT64 OpenMode,
+ IN UINT64 Attributes
);
/**
@@ -215,9 +215,9 @@ ShellOpenFileByName(
**/
EFI_STATUS
EFIAPI
-ShellCreateDirectory(
- IN CONST CHAR16 *DirectoryName,
- OUT SHELL_FILE_HANDLE *FileHandle
+ShellCreateDirectory (
+ IN CONST CHAR16 *DirectoryName,
+ OUT SHELL_FILE_HANDLE *FileHandle
);
/**
@@ -251,10 +251,10 @@ ShellCreateDirectory(
**/
EFI_STATUS
EFIAPI
-ShellReadFile(
- IN SHELL_FILE_HANDLE FileHandle,
- IN OUT UINTN *ReadSize,
- OUT VOID *Buffer
+ShellReadFile (
+ IN SHELL_FILE_HANDLE FileHandle,
+ IN OUT UINTN *ReadSize,
+ OUT VOID *Buffer
);
/**
@@ -285,10 +285,10 @@ ShellReadFile(
**/
EFI_STATUS
EFIAPI
-ShellWriteFile(
- IN SHELL_FILE_HANDLE FileHandle,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer
+ShellWriteFile (
+ IN SHELL_FILE_HANDLE FileHandle,
+ IN OUT UINTN *BufferSize,
+ IN VOID *Buffer
);
/**
@@ -306,7 +306,7 @@ ShellWriteFile(
EFI_STATUS
EFIAPI
ShellCloseFile (
- IN SHELL_FILE_HANDLE *FileHandle
+ IN SHELL_FILE_HANDLE *FileHandle
);
/**
@@ -326,7 +326,7 @@ ShellCloseFile (
EFI_STATUS
EFIAPI
ShellDeleteFile (
- IN SHELL_FILE_HANDLE *FileHandle
+ IN SHELL_FILE_HANDLE *FileHandle
);
/**
@@ -374,8 +374,8 @@ ShellSetFilePosition (
EFI_STATUS
EFIAPI
ShellGetFilePosition (
- IN SHELL_FILE_HANDLE FileHandle,
- OUT UINT64 *Position
+ IN SHELL_FILE_HANDLE FileHandle,
+ OUT UINT64 *Position
);
/**
@@ -395,7 +395,7 @@ ShellGetFilePosition (
EFI_STATUS
EFIAPI
ShellFlushFile (
- IN SHELL_FILE_HANDLE FileHandle
+ IN SHELL_FILE_HANDLE FileHandle
);
/** Retrieve first entry from a directory.
@@ -425,8 +425,8 @@ ShellFlushFile (
EFI_STATUS
EFIAPI
ShellFindFirstFile (
- IN SHELL_FILE_HANDLE DirHandle,
- OUT EFI_FILE_INFO **Buffer
+ IN SHELL_FILE_HANDLE DirHandle,
+ OUT EFI_FILE_INFO **Buffer
);
/** Retrieve next entries from a directory.
@@ -451,10 +451,10 @@ ShellFindFirstFile (
**/
EFI_STATUS
EFIAPI
-ShellFindNextFile(
- IN SHELL_FILE_HANDLE DirHandle,
- IN OUT EFI_FILE_INFO *Buffer,
- IN OUT BOOLEAN *NoFile
+ShellFindNextFile (
+ IN SHELL_FILE_HANDLE DirHandle,
+ IN OUT EFI_FILE_INFO *Buffer,
+ IN OUT BOOLEAN *NoFile
);
/**
@@ -472,8 +472,8 @@ ShellFindNextFile(
EFI_STATUS
EFIAPI
ShellGetFileSize (
- IN SHELL_FILE_HANDLE FileHandle,
- OUT UINT64 *Size
+ IN SHELL_FILE_HANDLE FileHandle,
+ OUT UINT64 *Size
);
/**
@@ -486,7 +486,7 @@ ShellGetFileSize (
**/
BOOLEAN
EFIAPI
-ShellGetExecutionBreakFlag(
+ShellGetExecutionBreakFlag (
VOID
);
@@ -501,10 +501,10 @@ ShellGetExecutionBreakFlag(
@retval NULL The named environment variable does not exist.
@return != NULL The pointer to the value of the environment variable.
**/
-CONST CHAR16*
+CONST CHAR16 *
EFIAPI
ShellGetEnvironmentVariable (
- IN CONST CHAR16 *EnvKey
+ IN CONST CHAR16 *EnvKey
);
/**
@@ -530,9 +530,9 @@ ShellGetEnvironmentVariable (
EFI_STATUS
EFIAPI
ShellSetEnvironmentVariable (
- IN CONST CHAR16 *EnvKey,
- IN CONST CHAR16 *EnvVal,
- IN BOOLEAN Volatile
+ IN CONST CHAR16 *EnvKey,
+ IN CONST CHAR16 *EnvVal,
+ IN BOOLEAN Volatile
);
/**
@@ -568,11 +568,11 @@ ShellSetEnvironmentVariable (
EFI_STATUS
EFIAPI
ShellExecute (
- IN EFI_HANDLE *ParentHandle,
- IN CHAR16 *CommandLine,
- IN BOOLEAN Output,
- IN CHAR16 **EnvironmentVariables,
- OUT EFI_STATUS *Status
+ IN EFI_HANDLE *ParentHandle,
+ IN CHAR16 *CommandLine,
+ IN BOOLEAN Output,
+ IN CHAR16 **EnvironmentVariables,
+ OUT EFI_STATUS *Status
);
/**
@@ -589,10 +589,10 @@ ShellExecute (
@retval NULL The directory does not exist.
@retval != NULL The directory.
**/
-CONST CHAR16*
+CONST CHAR16 *
EFIAPI
ShellGetCurrentDir (
- IN CHAR16 * CONST DeviceName OPTIONAL
+ IN CHAR16 *CONST DeviceName OPTIONAL
);
/**
@@ -606,7 +606,7 @@ ShellGetCurrentDir (
VOID
EFIAPI
ShellSetPageBreakMode (
- IN BOOLEAN CurrentState
+ IN BOOLEAN CurrentState
);
/**
@@ -635,9 +635,9 @@ ShellSetPageBreakMode (
EFI_STATUS
EFIAPI
ShellOpenFileMetaArg (
- IN CHAR16 *Arg,
- IN UINT64 OpenMode,
- IN OUT EFI_SHELL_FILE_INFO **ListHead
+ IN CHAR16 *Arg,
+ IN UINT64 OpenMode,
+ IN OUT EFI_SHELL_FILE_INFO **ListHead
);
/**
@@ -651,7 +651,7 @@ ShellOpenFileMetaArg (
EFI_STATUS
EFIAPI
ShellCloseFileMetaArg (
- IN OUT EFI_SHELL_FILE_INFO **ListHead
+ IN OUT EFI_SHELL_FILE_INFO **ListHead
);
/**
@@ -669,7 +669,7 @@ ShellCloseFileMetaArg (
CHAR16 *
EFIAPI
ShellFindFilePath (
- IN CONST CHAR16 *FileName
+ IN CONST CHAR16 *FileName
);
/**
@@ -691,12 +691,12 @@ ShellFindFilePath (
CHAR16 *
EFIAPI
ShellFindFilePathEx (
- IN CONST CHAR16 *FileName,
- IN CONST CHAR16 *FileExtension
+ IN CONST CHAR16 *FileName,
+ IN CONST CHAR16 *FileExtension
);
typedef enum {
- TypeFlag = 0, ///< A flag that is present or not present only (IE "-a").
+ TypeFlag = 0, ///< A flag that is present or not present only (IE "-a").
TypeValue, ///< A flag that has some data following it with a space (IE "-a 1").
TypePosition, ///< Some data that did not follow a parameter (IE "filename.txt").
TypeStart, ///< A flag that has variable value appended to the end (IE "-ad", "-afd", "-adf", etc...).
@@ -707,16 +707,15 @@ typedef enum {
} SHELL_PARAM_TYPE;
typedef struct {
- CHAR16 *Name;
- SHELL_PARAM_TYPE Type;
+ CHAR16 *Name;
+ SHELL_PARAM_TYPE Type;
} SHELL_PARAM_ITEM;
-
/// Helper structure for no parameters (besides -? and -b)
-extern SHELL_PARAM_ITEM EmptyParamList[];
+extern SHELL_PARAM_ITEM EmptyParamList[];
/// Helper structure for -sfo only (besides -? and -b)
-extern SHELL_PARAM_ITEM SfoParamList[];
+extern SHELL_PARAM_ITEM SfoParamList[];
/**
Checks the command line arguments passed against the list of valid ones.
@@ -745,15 +744,15 @@ extern SHELL_PARAM_ITEM SfoParamList[];
EFI_STATUS
EFIAPI
ShellCommandLineParseEx (
- IN CONST SHELL_PARAM_ITEM *CheckList,
- OUT LIST_ENTRY **CheckPackage,
- OUT CHAR16 **ProblemParam OPTIONAL,
- IN BOOLEAN AutoPageBreak,
- IN BOOLEAN AlwaysAllowNumbers
+ IN CONST SHELL_PARAM_ITEM *CheckList,
+ OUT LIST_ENTRY **CheckPackage,
+ OUT CHAR16 **ProblemParam OPTIONAL,
+ IN BOOLEAN AutoPageBreak,
+ IN BOOLEAN AlwaysAllowNumbers
);
/// Make it easy to upgrade from older versions of the shell library.
-#define ShellCommandLineParse(CheckList,CheckPackage,ProblemParam,AutoPageBreak) ShellCommandLineParseEx(CheckList,CheckPackage,ProblemParam,AutoPageBreak,FALSE)
+#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak) ShellCommandLineParseEx(CheckList,CheckPackage,ProblemParam,AutoPageBreak,FALSE)
/**
Frees shell variable list that was returned from ShellCommandLineParse.
@@ -768,7 +767,7 @@ ShellCommandLineParseEx (
VOID
EFIAPI
ShellCommandLineFreeVarList (
- IN LIST_ENTRY *CheckPackage
+ IN LIST_ENTRY *CheckPackage
);
/**
@@ -788,8 +787,8 @@ ShellCommandLineFreeVarList (
BOOLEAN
EFIAPI
ShellCommandLineGetFlag (
- IN CONST LIST_ENTRY * CONST CheckPackage,
- IN CONST CHAR16 * CONST KeyString
+ IN CONST LIST_ENTRY *CONST CheckPackage,
+ IN CONST CHAR16 *CONST KeyString
);
/**
@@ -805,11 +804,11 @@ ShellCommandLineGetFlag (
@retval NULL The flag is not on the command line.
@retval !=NULL The pointer to unicode string of the value.
**/
-CONST CHAR16*
+CONST CHAR16 *
EFIAPI
ShellCommandLineGetValue (
- IN CONST LIST_ENTRY *CheckPackage,
- IN CHAR16 *KeyString
+ IN CONST LIST_ENTRY *CheckPackage,
+ IN CHAR16 *KeyString
);
/**
@@ -825,11 +824,11 @@ ShellCommandLineGetValue (
@retval NULL The flag is not on the command line.
@retval !=NULL The pointer to unicode string of the value.
**/
-CONST CHAR16*
+CONST CHAR16 *
EFIAPI
ShellCommandLineGetRawValue (
- IN CONST LIST_ENTRY * CONST CheckPackage,
- IN UINTN Position
+ IN CONST LIST_ENTRY *CONST CheckPackage,
+ IN UINTN Position
);
/**
@@ -844,8 +843,8 @@ ShellCommandLineGetRawValue (
**/
UINTN
EFIAPI
-ShellCommandLineGetCount(
- IN CONST LIST_ENTRY *CheckPackage
+ShellCommandLineGetCount (
+ IN CONST LIST_ENTRY *CheckPackage
);
/**
@@ -865,8 +864,8 @@ ShellCommandLineGetCount(
EFI_STATUS
EFIAPI
ShellCommandLineCheckDuplicate (
- IN CONST LIST_ENTRY *CheckPackage,
- OUT CHAR16 **Param
+ IN CONST LIST_ENTRY *CheckPackage,
+ OUT CHAR16 **Param
);
/**
@@ -919,10 +918,10 @@ ShellInitialize (
**/
EFI_STATUS
EFIAPI
-ShellPrintEx(
- IN INT32 Col OPTIONAL,
- IN INT32 Row OPTIONAL,
- IN CONST CHAR16 *Format,
+ShellPrintEx (
+ IN INT32 Col OPTIONAL,
+ IN INT32 Row OPTIONAL,
+ IN CONST CHAR16 *Format,
...
);
@@ -960,12 +959,12 @@ ShellPrintEx(
**/
EFI_STATUS
EFIAPI
-ShellPrintHiiEx(
- IN INT32 Col OPTIONAL,
- IN INT32 Row OPTIONAL,
- IN CONST CHAR8 *Language OPTIONAL,
- IN CONST EFI_STRING_ID HiiFormatStringId,
- IN CONST EFI_HII_HANDLE HiiFormatHandle,
+ShellPrintHiiEx (
+ IN INT32 Col OPTIONAL,
+ IN INT32 Row OPTIONAL,
+ IN CONST CHAR8 *Language OPTIONAL,
+ IN CONST EFI_STRING_ID HiiFormatStringId,
+ IN CONST EFI_HII_HANDLE HiiFormatHandle,
...
);
@@ -982,8 +981,8 @@ ShellPrintHiiEx(
**/
EFI_STATUS
EFIAPI
-ShellIsDirectory(
- IN CONST CHAR16 *DirName
+ShellIsDirectory (
+ IN CONST CHAR16 *DirName
);
/**
@@ -1001,8 +1000,8 @@ ShellIsDirectory(
**/
EFI_STATUS
EFIAPI
-ShellIsFile(
- IN CONST CHAR16 *Name
+ShellIsFile (
+ IN CONST CHAR16 *Name
);
/**
@@ -1020,8 +1019,8 @@ ShellIsFile(
**/
EFI_STATUS
EFIAPI
-ShellIsFileInPath(
- IN CONST CHAR16 *Name
+ShellIsFileInPath (
+ IN CONST CHAR16 *Name
);
/**
@@ -1038,8 +1037,8 @@ ShellIsFileInPath(
**/
UINTN
EFIAPI
-ShellStrToUintn(
- IN CONST CHAR16 *String
+ShellStrToUintn (
+ IN CONST CHAR16 *String
);
/**
@@ -1055,8 +1054,8 @@ ShellStrToUintn(
**/
UINTN
EFIAPI
-ShellHexStrToUintn(
- IN CONST CHAR16 *String
+ShellHexStrToUintn (
+ IN CONST CHAR16 *String
);
/**
@@ -1091,13 +1090,13 @@ ShellHexStrToUintn(
@return The Destination after appending the Source.
**/
-CHAR16*
+CHAR16 *
EFIAPI
StrnCatGrow (
- IN OUT CHAR16 **Destination,
- IN OUT UINTN *CurrentSize,
- IN CONST CHAR16 *Source,
- IN UINTN Count
+ IN OUT CHAR16 **Destination,
+ IN OUT UINTN *CurrentSize,
+ IN CONST CHAR16 *Source,
+ IN UINTN Count
);
/**
@@ -1129,14 +1128,14 @@ StrnCatGrow (
**/
EFI_STATUS
EFIAPI
-ShellCopySearchAndReplace(
- IN CHAR16 CONST *SourceString,
- IN OUT CHAR16 *NewString,
- IN UINTN NewSize,
- IN CONST CHAR16 *FindTarget,
- IN CONST CHAR16 *ReplaceWith,
- IN CONST BOOLEAN SkipPreCarrot,
- IN CONST BOOLEAN ParameterReplacing
+ShellCopySearchAndReplace (
+ IN CHAR16 CONST *SourceString,
+ IN OUT CHAR16 *NewString,
+ IN UINTN NewSize,
+ IN CONST CHAR16 *FindTarget,
+ IN CONST CHAR16 *ReplaceWith,
+ IN CONST BOOLEAN SkipPreCarrot,
+ IN CONST BOOLEAN ParameterReplacing
);
/**
@@ -1156,7 +1155,7 @@ ShellCopySearchAndReplace(
BOOLEAN
EFIAPI
ShellIsHexaDecimalDigitCharacter (
- IN CHAR16 Char
+ IN CHAR16 Char
);
/**
@@ -1176,7 +1175,7 @@ ShellIsHexaDecimalDigitCharacter (
BOOLEAN
EFIAPI
ShellIsDecimalDigitCharacter (
- IN CHAR16 Char
+ IN CHAR16 Char
);
///
@@ -1233,9 +1232,9 @@ typedef enum {
EFI_STATUS
EFIAPI
ShellPromptForResponse (
- IN SHELL_PROMPT_REQUEST_TYPE Type,
- IN CHAR16 *Prompt OPTIONAL,
- IN OUT VOID **Response OPTIONAL
+ IN SHELL_PROMPT_REQUEST_TYPE Type,
+ IN CHAR16 *Prompt OPTIONAL,
+ IN OUT VOID **Response OPTIONAL
);
/**
@@ -1258,10 +1257,10 @@ ShellPromptForResponse (
EFI_STATUS
EFIAPI
ShellPromptForResponseHii (
- IN SHELL_PROMPT_REQUEST_TYPE Type,
- IN CONST EFI_STRING_ID HiiFormatStringId,
- IN CONST EFI_HII_HANDLE HiiFormatHandle,
- IN OUT VOID **Response
+ IN SHELL_PROMPT_REQUEST_TYPE Type,
+ IN CONST EFI_STRING_ID HiiFormatStringId,
+ IN CONST EFI_HII_HANDLE HiiFormatHandle,
+ IN OUT VOID **Response
);
/**
@@ -1301,9 +1300,9 @@ ShellIsHexOrDecimalNumber (
**/
EFI_STATUS
EFIAPI
-ShellConvertStringToUint64(
+ShellConvertStringToUint64 (
IN CONST CHAR16 *String,
- OUT UINT64 *Value,
+ OUT UINT64 *Value,
IN CONST BOOLEAN ForceHex,
IN CONST BOOLEAN StopAtSpace
);
@@ -1319,8 +1318,8 @@ ShellConvertStringToUint64(
**/
EFI_STATUS
EFIAPI
-ShellFileExists(
- IN CONST CHAR16 *Name
+ShellFileExists (
+ IN CONST CHAR16 *Name
);
/**
@@ -1338,11 +1337,11 @@ ShellFileExists(
@sa ShellFileHandleReadLine
**/
-CHAR16*
+CHAR16 *
EFIAPI
-ShellFileHandleReturnLine(
- IN SHELL_FILE_HANDLE Handle,
- IN OUT BOOLEAN *Ascii
+ShellFileHandleReturnLine (
+ IN SHELL_FILE_HANDLE Handle,
+ IN OUT BOOLEAN *Ascii
);
/**
@@ -1373,12 +1372,12 @@ ShellFileHandleReturnLine(
**/
EFI_STATUS
EFIAPI
-ShellFileHandleReadLine(
- IN SHELL_FILE_HANDLE Handle,
- IN OUT CHAR16 *Buffer,
- IN OUT UINTN *Size,
- IN BOOLEAN Truncate,
- IN OUT BOOLEAN *Ascii
+ShellFileHandleReadLine (
+ IN SHELL_FILE_HANDLE Handle,
+ IN OUT CHAR16 *Buffer,
+ IN OUT UINTN *Size,
+ IN BOOLEAN Truncate,
+ IN OUT BOOLEAN *Ascii
);
/**
@@ -1406,8 +1405,8 @@ ShellFileHandleReadLine(
**/
EFI_STATUS
EFIAPI
-ShellDeleteFileByName(
- IN CONST CHAR16 *FileName
+ShellDeleteFileByName (
+ IN CONST CHAR16 *FileName
);
/**
@@ -1424,9 +1423,9 @@ ShellDeleteFileByName(
EFI_STATUS
EFIAPI
ShellPrintHelp (
- IN CONST CHAR16 *CommandToGetHelpOn,
- IN CONST CHAR16 *SectionToGetHelpOn,
- IN BOOLEAN PrintCommandText
+ IN CONST CHAR16 *CommandToGetHelpOn,
+ IN CONST CHAR16 *SectionToGetHelpOn,
+ IN BOOLEAN PrintCommandText
);
#endif // __SHELL_LIB__