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
/**\r
Updates a file name to be preceeded by the mapped drive name\r
\r
- @param[in] BasePath the Mapped drive name to prepend\r
- @param[in,out] Path pointer to pointer to the file name to update.\r
+ @param[in] BasePath the Mapped drive name to prepend\r
+ @param[in, out] Path pointer to pointer to the file name to update.\r
\r
@retval EFI_SUCCESS\r
@retval EFI_OUT_OF_RESOURCES\r
Upon a EFI_SUCCESS return fromt he function any the caller is responsible to call\r
FreeFileList with FileList.\r
\r
- @param[in] FilePattern The FilePattern to check against.\r
- @param[in] UnicodeCollation The pointer to EFI_UNICODE_COLLATION_PROTOCOL structure\r
- @param[in] FileHandle The FileHandle to start with\r
- @param[in,out] FileList pointer to pointer to list of found files.\r
- @param[in] ParentNode The node for the parent. Same file as identified by HANDLE.\r
- @param[in] MapName The file system name this file is on.\r
+ @param[in] FilePattern The FilePattern to check against.\r
+ @param[in] UnicodeCollation The pointer to EFI_UNICODE_COLLATION_PROTOCOL structure\r
+ @param[in] FileHandle The FileHandle to start with\r
+ @param[in, out] FileList pointer to pointer to list of found files.\r
+ @param[in] ParentNode The node for the parent. Same file as identified by HANDLE.\r
+ @param[in] MapName The file system name this file is on.\r
\r
@retval EFI_SUCCESS all files were found and the FileList contains a list.\r
@retval EFI_NOT_FOUND no files were found\r
}\r
StrCpy(PatternCopy, FilePattern);\r
\r
- PatternCopy = CleanPath(PatternCopy);\r
+ PatternCopy = PathCleanUpDirectories(PatternCopy);\r
\r
Count = StrStr(PatternCopy, L":") - PatternCopy;\r
Count += 2;\r
CONST CHAR16 *CurDir;\r
BOOLEAN Found;\r
\r
- ShellCommandCleanPath(Path);\r
+ PathCleanUpDirectories(Path);\r
\r
Path2Size = 0;\r
Path2 = NULL;\r
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
StrnCatGrow(&Path2, NULL, Path, 0);\r
}\r
\r
- CleanPath (Path2);\r
+ PathCleanUpDirectories (Path2);\r
\r
//\r
// do the search\r
DirectoryName = StrnCatGrow(&DirectoryName, NULL, Dir, 0);\r
ASSERT(DirectoryName != NULL);\r
\r
- CleanPath(DirectoryName);\r
+ PathCleanUpDirectories(DirectoryName);\r
\r
if (FileSystem == NULL) {\r
//\r
\r
This must be removed via calling CleanUpShellProtocol().\r
\r
- @param[in,out] NewShell The pointer to the pointer to the structure\r
+ @param[in, out] NewShell The pointer to the pointer to the structure\r
to install.\r
\r
@retval EFI_SUCCESS The operation was successful.\r
Free all memory and restore the system to the state it was in before calling\r
CreatePopulateInstallShellProtocol.\r
\r
- @param[in,out] NewShell The pointer to the new shell protocol structure.\r
+ @param[in, out] NewShell The pointer to the new shell protocol structure.\r
\r
@retval EFI_SUCCESS The operation was successful.\r
**/\r
NULL,\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
\r
- Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlCNotifyHandle1);\r
- Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlCNotifyHandle2);\r
- Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlCNotifyHandle3);\r
- Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlCNotifyHandle4);\r
- Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlSNotifyHandle1);\r
- Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlSNotifyHandle2);\r
- Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlSNotifyHandle3);\r
- Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlSNotifyHandle4);\r
-\r
+ if (!EFI_ERROR (Status)) {\r
+ Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlCNotifyHandle1);\r
+ Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlCNotifyHandle2);\r
+ Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlCNotifyHandle3);\r
+ Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlCNotifyHandle4);\r
+ Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlSNotifyHandle1);\r
+ Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlSNotifyHandle2);\r
+ Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlSNotifyHandle3);\r
+ Status = SimpleEx->UnregisterKeyNotify(SimpleEx, ShellInfoObject.CtrlSNotifyHandle4);\r
+ }\r
return (Status);\r
}\r
\r