26 CONST CHAR16 *NewDirName;
27 CHAR16 *NewDirNameCopy;
33 SHELL_FILE_HANDLE FileHandle;
37 NewDirNameCopy =
NULL;
39 SaveSplitChar = CHAR_NULL;
50 if (EFI_ERROR (Status)) {
51 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam !=
NULL)) {
76 for ( DirCreateCount = 1
86 if (NewDirName ==
NULL) {
97 EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE,
100 if (!EFI_ERROR (Status)) {
105 ASSERT (FileHandle ==
NULL);
112 if (NewDirNameCopy ==
NULL) {
117 SplitName = NewDirNameCopy;
118 while (SplitName !=
NULL) {
119 SplitName =
StrStr (SplitName + 1, L
"\\");
120 if (SplitName !=
NULL) {
121 SaveSplitChar = *(SplitName + 1);
122 *(SplitName + 1) =
'\0';
134 if (!EFI_ERROR (Status)) {
138 if (EFI_ERROR (Status)) {
142 if (FileHandle !=
NULL) {
143 gEfiShellProtocol->CloseFile (FileHandle);
147 if (SplitName !=
NULL) {
148 *(SplitName + 1) = SaveSplitChar;
152 if (EFI_ERROR (Status)) {
158 SHELL_FREE_NON_NULL (NewDirNameCopy);
169 return (ShellStatus);
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
CHAR16 *EFIAPI PathCleanUpDirectories(IN CHAR16 *Path)
CHAR16 *EFIAPI StrStr(IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
#define ASSERT_EFI_ERROR(StatusParameter)
@ SHELL_INVALID_PARAMETER
SHELL_STATUS EFIAPI ShellCommandRunMkDir(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI ShellCreateDirectory(IN CONST CHAR16 *DirectoryName, OUT SHELL_FILE_HANDLE *FileHandle)
#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak)
Make it easy to upgrade from older versions of the shell library.
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,...)
BOOLEAN EFIAPI ShellCommandLineGetFlag(IN CONST LIST_ENTRY *CONST CheckPackage, IN CONST CHAR16 *CONST KeyString)
EFI_STATUS EFIAPI ShellOpenFileByName(IN CONST CHAR16 *FileName, OUT SHELL_FILE_HANDLE *FileHandle, IN UINT64 OpenMode, IN UINT64 Attributes)
VOID EFIAPI ShellCommandLineFreeVarList(IN LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellInitialize(VOID)
CONST CHAR16 *EFIAPI ShellCommandLineGetRawValue(IN CONST LIST_ENTRY *CONST CheckPackage, IN UINTN Position)
SHELL_PARAM_ITEM EmptyParamList[]
Helper structure for no parameters (besides -? and -b)
EFI_STATUS EFIAPI ShellCloseFile(IN SHELL_FILE_HANDLE *FileHandle)