public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add compat_ioctl to st
@ 2005-01-18 11:06 Andi Kleen
  2005-01-18 11:23 ` Christoph Hellwig
  2005-01-18 12:25 ` Matthew Wilcox
  0 siblings, 2 replies; 6+ messages in thread
From: Andi Kleen @ 2005-01-18 11:06 UTC (permalink / raw)
  To: James.Bottomley, Kai.Makisara, linux-scsi

Call new compat_ioctl host vector from tape driver

Signed-off-by: Andi Kleen <ak@muc.de>

diff -u linux-2.6.11-rc1-bk4/drivers/scsi/scsi_ioctl.c-o linux-2.6.11-rc1-bk4/drivers/scsi/scsi_ioctl.c
diff -u linux-2.6.11-rc1-bk4/drivers/scsi/st.c-o linux-2.6.11-rc1-bk4/drivers/scsi/st.c
--- linux-2.6.11-rc1-bk4/drivers/scsi/st.c-o	2005-01-04 12:13:07.000000000 +0100
+++ linux-2.6.11-rc1-bk4/drivers/scsi/st.c	2005-01-18 04:50:09.000000000 +0100
@@ -3425,6 +3425,22 @@
 	up(&STp->lock);
 	return retval;
 }
+
+#ifdef CONFIG_COMPAT
+static int st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+	struct scsi_tape *STp = file->private_data;
+	struct scsi_device *sdev = STp->device;
+	int ret = -ENOIOCTLCMD;
+	if (sdev->host->hostt->compat_ioctl) { 
+
+		ret = sdev->host->hostt->compat_ioctl(sdev, cmd, arg);
+
+	}
+	return ret;
+}
+#endif
+
 \f

 
 /* Try to allocate a new tape buffer. Calling function must not hold
@@ -3716,6 +3732,9 @@
 	.read =		st_read,
 	.write =	st_write,
 	.ioctl =	st_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl = st_compat_ioctl,
+#endif
 	.open =		st_open,
 	.flush =	st_flush,
 	.release =	st_release,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-18 12:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-18 11:06 [PATCH] Add compat_ioctl to st Andi Kleen
2005-01-18 11:23 ` Christoph Hellwig
2005-01-18 11:26   ` Andi Kleen
2005-01-18 12:25 ` Matthew Wilcox
2005-01-18 12:30   ` Andi Kleen
2005-01-18 12:54     ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox