From: rread@ubuntu.eng.hq.xensource.com Date: Tue, 6 Jan 2009 12:06:02 +0000 (+0000) Subject: [xen-xo] CA-259 fake out GET_IDLUN scsi ioctl X-Git-Tag: netback-thread X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7581c03b142d071555f08ec0585ec140a04c60b3;p=xenclient%2Fkernel.git [xen-xo] CA-259 fake out GET_IDLUN scsi ioctl Signed-off-by: Andrew Peace Signed-off-by: Robert Read --- diff --git a/drivers/xen/blkfront/blkfront.c b/drivers/xen/blkfront/blkfront.c index 83e5c6a6..2464f802 100644 --- a/drivers/xen/blkfront/blkfront.c +++ b/drivers/xen/blkfront/blkfront.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -538,6 +539,17 @@ int blkif_ioctl(struct inode *inode, struct file *filep, return -EFAULT; return 0; + case SCSI_IOCTL_GET_IDLUN: + if (!access_ok(VERIFY_WRITE, argument, + sizeof(struct scsi_idlun))) + return -EFAULT; + + /* return 0 for now. */ + __put_user(0, &((struct scsi_idlun __user *)argument)->dev_id); + __put_user(0, + &((struct scsi_idlun __user *)argument)->host_unique_id); + return 0; + case CDROM_GET_CAPABILITY: { struct blkfront_info *info = inode->i_bdev->bd_disk->private_data;