Re: [PATCH] Move SG_GET_SCSI_ID from sg to scsi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 26, 2006 at 09:28:28PM +0200, Bodo Eggert wrote:
>          case SCSI_IOCTL_GET_PCI:
>                  return scsi_ioctl_get_pci(sdev, arg);
> +	case SG_GET_SCSI_ID:

You're using the old ioctl name here ...

> +		if (!access_ok(VERIFY_WRITE, arg, sizeof (struct scsi_ioctl_id)))
> +			return -EFAULT;
> +		else {
> +			struct scsi_ioctl_id __user *idp = arg;
> +
> +			__put_user((int) sdev->host->host_no,
> +				   &idp->host_no);

The cast isn't necessary; __put_user casts the argument to the type of
the pointer.

> +			__put_user(0, &idp->unused[0]);
> +			__put_user(0, &idp->unused[1]);

Is it time to repurpose the unused bytes for the 64-bit LUN?

> +struct scsi_ioctl_id { /* used by SCSI_IOCTL_GET_ID ioctl() */
> +    int host_no;        /* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */

tabs instead of spaces?

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux