/* The scsi_ioctl_get_pci() function places into arg the value pci_dev::slot_name (8 characters) for the PCI device (if any). Returns: 0 on success -ENXIO if there isn't a PCI device pointer (could be because the SCSI driver hasn't been updated yet, or because it isn't a SCSI device) any copy_to_user() error on failure there  */
static int scsi_ioctl_get_pci(struct scsi_device *sdev, void __user *arg)
/* The scsi_ioctl_get_pci() function places into arg the value pci_dev::slot_name (8 characters) for the PCI device (if any). Returns: 0 on success -ENXIO if there isn't a PCI device pointer (could be because the SCSI driver hasn't been updated yet, or because it isn't a SCSI device) any copy_to_user() error on failure there  */
static int scsi_ioctl_get_pci(struct scsi_device *sdev, void __user *arg)
{
	struct device *dev = scsi_get_device(sdev->host);
	const char *name;
        if (!dev)
		return -ENXIO;
	name = dev_name(dev);
        return copy_to_user(arg, name, min(strlen(name), (size_t)20))
		? -EFAULT: 0;
}