X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDisk%2FPartitionDxe%2FPartition.c;h=5a7d119b43970f9c10dcbe9f6caa713b7b0705cf;hp=1c53bf0233fdda1a82d4078b4d80af15d9a1158b;hb=3a3d62d2e66d7bec1b97f51c26eac5326e30ad94;hpb=bce72b5837a58348295b34b562a55499371ba8de diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index 1c53bf0233..5a7d119b43 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -4,7 +4,7 @@ of the raw block devices media. Currently "El Torito CD-ROM", Legacy MBR, and GPT partition schemes are supported. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -514,6 +514,8 @@ PartitionDriverBindingStop ( &Private->BlockIo, &gEfiBlockIo2ProtocolGuid, &Private->BlockIo2, + &gEfiPartitionInfoProtocolGuid, + &Private->PartitionInfo, Private->EspGuid, NULL, NULL @@ -526,6 +528,8 @@ PartitionDriverBindingStop ( Private->DevicePath, &gEfiBlockIoProtocolGuid, &Private->BlockIo, + &gEfiPartitionInfoProtocolGuid, + &Private->PartitionInfo, Private->EspGuid, NULL, NULL @@ -1092,10 +1096,10 @@ PartitionFlushBlocksEx ( @param[in] ParentBlockIo2 Parent BlockIo2 interface. @param[in] ParentDevicePath Parent Device Path. @param[in] DevicePathNode Child Device Path node. + @param[in] PartitionInfo Child Partition Information interface. @param[in] Start Start Block. @param[in] End End Block. @param[in] BlockSize Child block size. - @param[in] InstallEspGuid Flag to install EFI System Partition GUID on handle. @retval EFI_SUCCESS A child handle was added. @retval other A child handle was not added. @@ -1111,10 +1115,10 @@ PartitionInstallChildHandle ( IN EFI_BLOCK_IO2_PROTOCOL *ParentBlockIo2, IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, + IN EFI_PARTITION_INFO_PROTOCOL *PartitionInfo, IN EFI_LBA Start, IN EFI_LBA End, - IN UINT32 BlockSize, - IN BOOLEAN InstallEspGuid + IN UINT32 BlockSize ) { EFI_STATUS Status; @@ -1203,7 +1207,12 @@ PartitionInstallChildHandle ( return EFI_OUT_OF_RESOURCES; } - if (InstallEspGuid) { + // + // Set the PartitionInfo into Private Data. + // + CopyMem (&Private->PartitionInfo, PartitionInfo, sizeof (EFI_PARTITION_INFO_PROTOCOL)); + + if ((PartitionInfo->System == 1)) { Private->EspGuid = &gEfiPartTypeSystemPartGuid; } else { // @@ -1225,6 +1234,8 @@ PartitionInstallChildHandle ( &Private->BlockIo, &gEfiBlockIo2ProtocolGuid, &Private->BlockIo2, + &gEfiPartitionInfoProtocolGuid, + &Private->PartitionInfo, Private->EspGuid, NULL, NULL @@ -1236,6 +1247,8 @@ PartitionInstallChildHandle ( Private->DevicePath, &gEfiBlockIoProtocolGuid, &Private->BlockIo, + &gEfiPartitionInfoProtocolGuid, + &Private->PartitionInfo, Private->EspGuid, NULL, NULL