/* Gets the device path of a specific storage security device. */
EFI_STATUS EFIAPI NvmeStorageSecurityGetDevicePath(IN EDKII_PEI_STORAGE_SECURITY_CMD_PPI *This, IN UINTN DeviceIndex, OUT UINTN *DevicePathLength, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
/* Gets the device path of a specific storage security device. */
EFI_STATUS EFIAPI NvmeStorageSecurityGetDevicePath(IN EDKII_PEI_STORAGE_SECURITY_CMD_PPI *This, IN UINTN DeviceIndex, OUT UINTN *DevicePathLength, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
{
  PEI_NVME_CONTROLLER_PRIVATE_DATA  *Private;
  if ((This == NULL) || (DevicePathLength == NULL) || (DevicePath == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  Private = GET_NVME_PEIM_HC_PRIVATE_DATA_FROM_THIS_STROAGE_SECURITY (This);
  if ((DeviceIndex == 0) || (DeviceIndex > Private->ActiveNamespaceNum)) {
    return EFI_INVALID_PARAMETER;
  }
  return NvmeBuildDevicePath (
           Private,
           Private->NamespaceInfo[DeviceIndex-1].NamespaceId,
           Private->NamespaceInfo[DeviceIndex-1].NamespaceUuid,
           DevicePathLength,
           DevicePath
           );
}