}\r
\r
//\r
- // find the partition device path node\r
+ // Match all the partition device path nodes including the nested partition nodes\r
//\r
while (!IsDevicePathEnd (BlockIoDevicePath)) {\r
if ((DevicePathType (BlockIoDevicePath) == MEDIA_DEVICE_PATH) &&\r
(DevicePathSubType (BlockIoDevicePath) == MEDIA_HARDDRIVE_DP)\r
) {\r
- break;\r
+ //\r
+ // See if the harddrive device path in blockio matches the orig Hard Drive Node\r
+ //\r
+ Node = (HARDDRIVE_DEVICE_PATH *) BlockIoDevicePath;\r
+\r
+ //\r
+ // Match Signature and PartitionNumber.\r
+ // Unused bytes in Signature are initiaized with zeros.\r
+ //\r
+ if ((Node->PartitionNumber == HardDriveDevicePath->PartitionNumber) &&\r
+ (Node->MBRType == HardDriveDevicePath->MBRType) &&\r
+ (Node->SignatureType == HardDriveDevicePath->SignatureType) &&\r
+ (CompareMem (Node->Signature, HardDriveDevicePath->Signature, sizeof (Node->Signature)) == 0)) {\r
+ return TRUE;\r
+ }\r
}\r
\r
BlockIoDevicePath = NextDevicePathNode (BlockIoDevicePath);\r
}\r
\r
- if (IsDevicePathEnd (BlockIoDevicePath)) {\r
- return FALSE;\r
- }\r
-\r
- //\r
- // See if the harddrive device path in blockio matches the orig Hard Drive Node\r
- //\r
- Node = (HARDDRIVE_DEVICE_PATH *) BlockIoDevicePath;\r
-\r
- //\r
- // Match Signature and PartitionNumber.\r
- // Unused bytes in Signature are initiaized with zeros.\r
- //\r
- return (BOOLEAN) (\r
- (Node->PartitionNumber == HardDriveDevicePath->PartitionNumber) &&\r
- (Node->MBRType == HardDriveDevicePath->MBRType) &&\r
- (Node->SignatureType == HardDriveDevicePath->SignatureType) &&\r
- (CompareMem (Node->Signature, HardDriveDevicePath->Signature, sizeof (Node->Signature)) == 0)\r
- );\r
+ return FALSE;\r
}\r
\r
/**\r