/** DevicePathNode must be SerialVendor type and this will populate the MappingItem. @param[in] DevicePathNode The node to get info on. @param[in] MappingItem The info item to populate. **/ VOID EFIAPI DevPathSerialVendor ( IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem ) { VENDOR_DEVICE_PATH *Vendor; SAS_DEVICE_PATH *Sas; if (DevicePathNode == NULL || MappingItem == NULL) { return; } Vendor = (VENDOR_DEVICE_PATH *) DevicePathNode; AppendCSDGuid (MappingItem, &Vendor->Guid); if (CompareGuid (&gEfiSasDevicePathGuid, &Vendor->Guid)) { Sas = (SAS_DEVICE_PATH *) Vendor; AppendCSDNum (MappingItem, Sas->SasAddress); AppendCSDNum (MappingItem, Sas->Lun); AppendCSDNum (MappingItem, Sas->DeviceTopology); AppendCSDNum (MappingItem, Sas->RelativeTargetPort); } }
VOID _DevPathSerialVendor ( IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem ) { VENDOR_DEVICE_PATH *Vendor; SAS_DEVICE_PATH *Sas; EFI_GUID SasVendorGuid = DEVICE_PATH_MESSAGING_SAS; ASSERT(DevicePathNode != NULL); ASSERT(MappingItem != NULL); Vendor = (VENDOR_DEVICE_PATH *) DevicePathNode; AppendCSDGuid (MappingItem, &Vendor->Guid); if (CompareGuid (&SasVendorGuid, &Vendor->Guid) == 0) { Sas = (SAS_DEVICE_PATH *) Vendor; AppendCSDNum (MappingItem, Sas->SasAddress); AppendCSDNum (MappingItem, Sas->Lun); AppendCSDNum (MappingItem, Sas->DeviceTopology); AppendCSDNum (MappingItem, Sas->RelativeTargetPort); } }