]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellProtocol.c
This refactors 3 functions out of ShellCommandLib and puts them into a new library...
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellProtocol.c
index f0416ca93705c38f8b12baa4743048f1c1c33055..e42f081834de528d600b67725854bd1716fb2299 100644 (file)
@@ -529,7 +529,7 @@ EfiShellGetDevicePathFromFilePath(
     StrCpy(NewPath, Cwd);\r
     if (*Path == L'\\') {\r
       Path++;\r
-      while (ChopLastSlash(NewPath)) ;\r
+      while (PathRemoveLastItem(NewPath)) ;\r
     }\r
     StrCat(NewPath, Path);\r
     DevicePathForReturn = EfiShellGetDevicePathFromFilePath(NewPath);\r
@@ -2232,7 +2232,7 @@ EfiShellFindFiles(
   }\r
   StrCpy(PatternCopy, FilePattern);\r
 \r
-  PatternCopy = CleanPath(PatternCopy);\r
+  PatternCopy = PathCleanUpDirectories(PatternCopy);\r
 \r
   Count = StrStr(PatternCopy, L":") - PatternCopy;\r
   Count += 2;\r
@@ -2293,7 +2293,7 @@ EfiShellOpenFileList(
   CONST CHAR16        *CurDir;\r
   BOOLEAN             Found;\r
 \r
-  ShellCommandCleanPath(Path);\r
+  PathCleanUpDirectories(Path);\r
 \r
   Path2Size     = 0;\r
   Path2         = NULL;\r
@@ -2315,7 +2315,7 @@ EfiShellOpenFileList(
     StrnCatGrow(&Path2, &Path2Size, CurDir, 0);\r
     if (*Path == L'\\') {\r
       Path++;\r
-      while (ChopLastSlash(Path2)) ;\r
+      while (PathRemoveLastItem(Path2)) ;\r
     }\r
     ASSERT((Path2 == NULL && Path2Size == 0) || (Path2 != NULL));\r
     StrnCatGrow(&Path2, &Path2Size, Path, 0);\r
@@ -2324,7 +2324,7 @@ EfiShellOpenFileList(
     StrnCatGrow(&Path2, NULL, Path, 0);\r
   }\r
 \r
-  CleanPath (Path2);\r
+  PathCleanUpDirectories (Path2);\r
 \r
   //\r
   // do the search\r
@@ -2677,7 +2677,7 @@ EfiShellSetCurDir(
   DirectoryName = StrnCatGrow(&DirectoryName, NULL, Dir, 0);\r
   ASSERT(DirectoryName != NULL);\r
 \r
-  CleanPath(DirectoryName);\r
+  PathCleanUpDirectories(DirectoryName);\r
 \r
   if (FileSystem == NULL) {\r
     //\r