From: James Bottomley <James.Bottomley@SteelEye.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] get the kernel to warn about deprecated SCSI ioctls
Date: 19 Aug 2004 17:06:00 -0400 [thread overview]
Message-ID: <1092949566.1728.1314.camel@mulgrave> (raw)
In-Reply-To: <20040819172109.A10853@infradead.org>
On Thu, 2004-08-19 at 12:21, Christoph Hellwig wrote:
> drivers/block/scsi_ioctl.c also implements SCSI_IOCTL_SEND_COMMAND, so
> you'll have to warn there aswell.
Done.
No other places I've missed?
James
===== drivers/block/scsi_ioctl.c 1.53 vs edited =====
--- 1.53/drivers/block/scsi_ioctl.c 2004-08-14 05:24:49 -05:00
+++ edited/drivers/block/scsi_ioctl.c 2004-08-19 15:51:44 -05:00
@@ -510,6 +510,7 @@
* old junk scsi send command ioctl
*/
case SCSI_IOCTL_SEND_COMMAND:
+ printk(KERN_WARNING "program %s is using a deprecated SCSI ioctl, please convert it to SG_IO\n", current->comm);
err = -EINVAL;
if (!arg)
break;
===== drivers/scsi/scsi_ioctl.c 1.28 vs edited =====
--- 1.28/drivers/scsi/scsi_ioctl.c 2004-06-26 17:40:24 -05:00
+++ edited/drivers/scsi/scsi_ioctl.c 2004-08-19 09:45:22 -05:00
@@ -391,6 +391,21 @@
if (!scsi_block_when_processing_errors(sdev))
return -ENODEV;
+ /* Check for deprecated ioctls ... all the ioctls which don't
+ * follow the new unique numbering scheme are deprecated */
+ switch (cmd) {
+ case SCSI_IOCTL_SEND_COMMAND:
+ case SCSI_IOCTL_TEST_UNIT_READY:
+ case SCSI_IOCTL_BENCHMARK_COMMAND:
+ case SCSI_IOCTL_SYNC:
+ case SCSI_IOCTL_START_UNIT:
+ case SCSI_IOCTL_STOP_UNIT:
+ printk(KERN_WARNING "program %s is using a deprecated SCSI ioctl, please convert it to SG_IO\n", current->comm);
+ break;
+ default:
+ break;
+ }
+
switch (cmd) {
case SCSI_IOCTL_GET_IDLUN:
if (verify_area(VERIFY_WRITE, arg, sizeof(struct scsi_idlun)))
next prev parent reply other threads:[~2004-08-19 21:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 16:19 [PATCH] get the kernel to warn about deprecated SCSI ioctls James Bottomley
2004-08-19 16:21 ` Christoph Hellwig
2004-08-19 21:06 ` James Bottomley [this message]
2004-08-19 16:23 ` Jeff Garzik
2004-08-19 16:28 ` James Bottomley
2004-08-19 16:41 ` Jeff Garzik
2004-08-19 22:18 ` Douglas Gilbert
2004-08-19 22:27 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2004-08-19 17:06 Pat LaVarre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1092949566.1728.1314.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox