IN SHELL_FILE_HANDLE Handle\r
);\r
\r
-/**\r
- Function to get the original CmdLine string for current command.\r
-\r
- @return A pointer to the buffer of the original command string.\r
- It's the caller's responsibility to free the buffer.\r
-**/\r
-CHAR16*\r
-EFIAPI\r
-ShellGetRawCmdLine (\r
- VOID\r
- );\r
-\r
-/**\r
- Function to store the orgignal command string into mOriginalCmdLine.\r
-\r
- @param[in] CmdLine the command line string to store.\r
-**/\r
-VOID\r
-EFIAPI\r
-ShellSetRawCmdLine (\r
- IN CONST CHAR16 *CmdLine\r
- );\r
-\r
typedef struct {\r
LIST_ENTRY Link;\r
void *Buffer;\r
STATIC UINTN mFsMaxCount = 0;\r
STATIC UINTN mBlkMaxCount = 0;\r
STATIC BUFFER_LIST mFileHandleList;\r
-STATIC CHAR16 *mRawCmdLine = NULL;\r
\r
STATIC CONST CHAR8 Hex[] = {\r
'0',\r
return (RetVal);\r
}\r
\r
-/**\r
- Function to get the original CmdLine string for current command.\r
-\r
- @return A pointer to the buffer of the original command string.\r
- It's the caller's responsibility to free the buffer.\r
-**/\r
-CHAR16*\r
-EFIAPI\r
-ShellGetRawCmdLine (\r
- VOID\r
- )\r
-{\r
- if (mRawCmdLine == NULL) {\r
- return NULL;\r
- } else {\r
- return AllocateCopyPool(StrSize(mRawCmdLine), mRawCmdLine);\r
- }\r
-}\r
-\r
-/**\r
- Function to store the raw command string.\r
-\r
- The alias and variables have been replaced and spaces are trimmed.\r
-\r
- @param[in] CmdLine the command line string to store.\r
-**/\r
-VOID\r
-EFIAPI\r
-ShellSetRawCmdLine (\r
- IN CONST CHAR16 *CmdLine\r
- )\r
-{\r
- SHELL_FREE_NON_NULL(mRawCmdLine);\r
-\r
- if (CmdLine != NULL) {\r
- //\r
- // The spaces in the beginning and end are trimmed.\r
- //\r
- ASSERT (*CmdLine != L' ');\r
- ASSERT (CmdLine[StrLen (CmdLine) - 1] != L' ');\r
- mRawCmdLine = AllocateCopyPool (StrSize(CmdLine), CmdLine);\r
- }\r
-}\r
-\r
/**\r
Frees any BUFFER_LIST defined type.\r
\r