]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLib/UefiShellLib.c
ShellPkg/UefiShellLib: drop DeviceHandle param of ShellOpenFileByDevicePath()
[mirror_edk2.git] / ShellPkg / Library / UefiShellLib / UefiShellLib.c
index 3c24ba1742bf1362f51f0adc643ff6b8391400ea..18c3be4a8bc7da6b9df473c7495f803e2dc023f3 100644 (file)
@@ -472,7 +472,6 @@ ShellSetFileInfo (
 \r
   @param  FilePath        on input the device path to the file.  On output\r
                           the remaining device path.\r
-  @param  DeviceHandle    pointer to the system device handle.\r
   @param  FileHandle      pointer to the file handle.\r
   @param  OpenMode        the mode to open the file with.\r
   @param  Attributes      the file's file attributes.\r
@@ -498,7 +497,6 @@ EFI_STATUS
 EFIAPI\r
 ShellOpenFileByDevicePath(\r
   IN OUT EFI_DEVICE_PATH_PROTOCOL     **FilePath,\r
-  OUT EFI_HANDLE                      *DeviceHandle,\r
   OUT SHELL_FILE_HANDLE               *FileHandle,\r
   IN UINT64                           OpenMode,\r
   IN UINT64                           Attributes\r
@@ -511,8 +509,9 @@ ShellOpenFileByDevicePath(
   EFI_FILE_PROTOCOL               *Handle2;\r
   CHAR16                          *FnafPathName;\r
   UINTN                           PathLen;\r
+  EFI_HANDLE                      DeviceHandle;\r
 \r
-  if (FilePath == NULL || FileHandle == NULL || DeviceHandle == NULL) {\r
+  if (FilePath == NULL || FileHandle == NULL) {\r
     return (EFI_INVALID_PARAMETER);\r
   }\r
 \r
@@ -538,11 +537,11 @@ ShellOpenFileByDevicePath(
   //\r
   Status = gBS->LocateDevicePath (&gEfiSimpleFileSystemProtocolGuid,\r
                                   FilePath,\r
-                                  DeviceHandle);\r
+                                  &DeviceHandle);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  Status = gBS->OpenProtocol(*DeviceHandle,\r
+  Status = gBS->OpenProtocol(DeviceHandle,\r
                              &gEfiSimpleFileSystemProtocolGuid,\r
                              (VOID**)&EfiSimpleFileSystemProtocol,\r
                              gImageHandle,\r
@@ -690,7 +689,6 @@ ShellOpenFileByName(
   IN UINT64                     Attributes\r
   )\r
 {\r
-  EFI_HANDLE                    DeviceHandle;\r
   EFI_DEVICE_PATH_PROTOCOL      *FilePath;\r
   EFI_STATUS                    Status;\r
   EFI_FILE_INFO                 *FileInfo;\r
@@ -774,7 +772,6 @@ ShellOpenFileByName(
   FilePath = mEfiShellEnvironment2->NameToPath ((CHAR16*)FileName);\r
   if (FilePath != NULL) {\r
     return (ShellOpenFileByDevicePath(&FilePath,\r
-                                      &DeviceHandle,\r
                                       FileHandle,\r
                                       OpenMode,\r
                                       Attributes));\r