return (FALSE);\r
}\r
\r
-/**\r
- Internal worker debug helper function to print out maps as they are added.\r
-\r
- @param[in] Mapping string mapping that has been added\r
- @param[in] DevicePath pointer to device path that has been mapped.\r
-\r
- @retval EFI_SUCCESS the operation was successful.\r
- @return other an error ocurred\r
-\r
- @sa LocateHandle\r
- @sa OpenProtocol\r
-**/\r
-EFI_STATUS\r
-InternalShellProtocolDebugPrintMessage (\r
- IN CONST CHAR16 *Mapping,\r
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- )\r
-{\r
- EFI_STATUS Status;\r
- CHAR16 *Temp;\r
-\r
- Status = EFI_SUCCESS;\r
- DEBUG_CODE_BEGIN();\r
-\r
- if (Mapping != NULL) {\r
- DEBUG((EFI_D_INFO, "Added new map item:\"%S\"\r\n", Mapping));\r
- }\r
- Temp = ConvertDevicePathToText(DevicePath, TRUE, TRUE);\r
- DEBUG((EFI_D_INFO, "DevicePath: %S\r\n", Temp));\r
- FreePool(Temp);\r
-\r
- DEBUG_CODE_END();\r
- return (Status);\r
-}\r
\r
/**\r
This function creates a mapping for a device path.\r
// We are opening a regular file.\r
//\r
DevicePath = EfiShellGetDevicePathFromFilePath(FileName);\r
-// DEBUG_CODE(InternalShellProtocolDebugPrintMessage (NULL, DevicePath););\r
+\r
if (DevicePath == NULL) {\r
return (EFI_NOT_FOUND);\r
}\r
return (EFI_SUCCESS);\r
}\r
\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
-\r
- @retval EFI_SUCCESS\r
- @retval EFI_OUT_OF_RESOURCES\r
-**/\r
-EFI_STATUS\r
-UpdateFileName(\r
- IN CONST CHAR16 *BasePath,\r
- IN OUT CHAR16 **Path\r
- )\r
-{\r
- CHAR16 *Path2;\r
- UINTN Path2Size;\r
-\r
- Path2Size = 0;\r
- Path2 = NULL;\r
-\r
- ASSERT(Path != NULL);\r
- ASSERT(*Path != NULL);\r
- ASSERT(BasePath != NULL);\r
-\r
- //\r
- // convert a local path to an absolute path\r
- //\r
- if (StrStr(*Path, L":") == NULL) {\r
- ASSERT((Path2 == NULL && Path2Size == 0) || (Path2 != NULL));\r
- StrnCatGrow(&Path2, &Path2Size, BasePath, 0);\r
- if (Path2 == NULL) {\r
- return (EFI_OUT_OF_RESOURCES);\r
- }\r
- ASSERT((Path2 == NULL && Path2Size == 0) || (Path2 != NULL));\r
- StrnCatGrow(&Path2, &Path2Size, (*Path)[0] == L'\\'?(*Path) + 1 :*Path, 0);\r
- if (Path2 == NULL) {\r
- return (EFI_OUT_OF_RESOURCES);\r
- }\r
- }\r
-\r
- FreePool(*Path);\r
- (*Path) = Path2;\r
\r
- return (EFI_SUCCESS);\r
-}\r
\r
/**\r
If FileHandle is a directory then the function reads from FileHandle and reads in\r