[PATCH] comments about conflicting SCSI/CDROM ioctls

From: Andreas Dilger (adilger@turbolinux.com)
Date: Tue Apr 10 2001 - 19:01:25 EST


This patch adds a couple of comments to the cdrom and SCSI code warning of
duplicate ioctl numbers.

Cheers, Andreas
============================================================================
diff -ru linux.orig/include/linux/cdrom.h linux/include/linux/cdrom.h
--- linux.orig/include/linux/cdrom.h Thu Jan 4 15:50:47 2001
+++ linux/include/linux/cdrom.h Fri Feb 16 17:12:05 2001
@@ -128,8 +128,13 @@
 #define CDROM_DEBUG 0x5330 /* Turn debug messages on/off */
 #define CDROM_GET_CAPABILITY 0x5331 /* get capabilities */
 
+/* Note that scsi/scsi_ioctl.h also uses 0x5382 - 0x5386.
+ * Future CDROM ioctls should be kept below 0x537F
+ */
+
 /* This ioctl is only used by sbpcd at the moment */
 #define CDROMAUDIOBUFSIZ 0x5382 /* set the audio buffer size */
+ /* conflict with SCSI_IOCTL_GET_IDLUN */
 
 /* DVD-ROM Specific ioctls */
 #define DVD_READ_STRUCT 0x5390 /* Read structure */
diff -ru -x .[a-z]* ./include/scsi/scsi.h /usr/src/linux-2.4.0-0.3/include/scsi/scsi.h
--- ./include/scsi/scsi.h Tue Sep 5 15:08:55 2000
+++ /usr/src/linux-2.4.0-0.3/include/scsi/scsi.h Fri Feb 16 17:11:51 2001
@@ -196,8 +196,9 @@
  * Here are some scsi specific ioctl commands which are sometimes useful.
  */
 /* These are a few other constants only used by scsi devices */
+/* Note that include/linux/cdrom.h also defines IOCTL 0x5300 - 0x5395 */
 
-#define SCSI_IOCTL_GET_IDLUN 0x5382
+#define SCSI_IOCTL_GET_IDLUN 0x5382 /* conflicts with CDROMAUDIOBUFSIZ */
 
 /* Used to turn on and off tagged queuing for scsi devices */
 

-- 
Andreas Dilger                               TurboLabs filesystem development
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:14 EST