]> xenbits.xen.org Git - xenclient/kernel.git/commitdiff
[xen-xo] CA-259 fake out GET_IDLUN scsi ioctl netback-thread
authorrread@ubuntu.eng.hq.xensource.com <rread@ubuntu.eng.hq.xensource.com>
Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)
committerrread@ubuntu.eng.hq.xensource.com <rread@ubuntu.eng.hq.xensource.com>
Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)
Signed-off-by: Andrew Peace <andrew.peace@xensource.com>
Signed-off-by: Robert Read <rread@xensource.com>
drivers/xen/blkfront/blkfront.c

index 83e5c6a605fb6e7dad1fea56483c05af6e5bbe0f..2464f80252068709f48a1960e2cb86b81e64be3d 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 #include <scsi/scsi.h>
+#include <scsi/scsi_ioctl.h>
 #include <xen/evtchn.h>
 #include <xen/xenbus.h>
 #include <xen/interface/grant_table.h>
@@ -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;