73 lines
2.8 KiB
Diff
73 lines
2.8 KiB
Diff
|
--- valgrind-3.7.0/include/vki/vki-linux.h.jj 2011-10-26 23:24:31.000000000 +0200
|
||
|
+++ valgrind-3.7.0/include/vki/vki-linux.h 2012-01-27 16:11:53.373379491 +0100
|
||
|
@@ -1730,6 +1730,15 @@ typedef struct vki_sg_scsi_id { /* used
|
||
|
#define VKI_SG_SET_COMMAND_Q 0x2271 /* Change queuing state with 0 or 1 */
|
||
|
|
||
|
//----------------------------------------------------------------------
|
||
|
+// From linux-2.6.34/include/scsi/scsi.h and scsi/scsi_ioctl.h
|
||
|
+//----------------------------------------------------------------------
|
||
|
+
|
||
|
+#define VKI_SCSI_IOCTL_DOORLOCK 0x5380 /* Lock the eject mechanism. */
|
||
|
+#define VKI_SCSI_IOCTL_DOORUNLOCK 0x5381 /* Unlock the mechanism. */
|
||
|
+#define VKI_SCSI_IOCTL_GET_IDLUN 0x5382
|
||
|
+#define VKI_SCSI_IOCTL_GET_BUS_NUMBER 0x5386
|
||
|
+
|
||
|
+//----------------------------------------------------------------------
|
||
|
// From linux-2.6.8.1/include/linux/cdrom.h
|
||
|
//----------------------------------------------------------------------
|
||
|
|
||
|
--- valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c.jj 2012-01-27 13:27:26.000000000 +0100
|
||
|
+++ valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c 2012-01-27 16:18:05.377177786 +0100
|
||
|
@@ -3935,6 +3935,10 @@ PRE(sys_ioctl)
|
||
|
case VKI_SNDRV_TIMER_IOCTL_STOP:
|
||
|
case VKI_SNDRV_TIMER_IOCTL_CONTINUE:
|
||
|
case VKI_SNDRV_TIMER_IOCTL_PAUSE:
|
||
|
+
|
||
|
+ /* SCSI no operand */
|
||
|
+ case VKI_SCSI_IOCTL_DOORLOCK:
|
||
|
+ case VKI_SCSI_IOCTL_DOORUNLOCK:
|
||
|
PRINT("sys_ioctl ( %ld, 0x%lx )",ARG1,ARG2);
|
||
|
PRE_REG_READ2(long, "ioctl",
|
||
|
unsigned int, fd, unsigned int, request);
|
||
|
@@ -4420,6 +4424,14 @@ PRE(sys_ioctl)
|
||
|
VKI_SIZEOF_STRUCT_HD_DRIVEID );
|
||
|
break;
|
||
|
|
||
|
+ /* SCSI */
|
||
|
+ case VKI_SCSI_IOCTL_GET_IDLUN: /* 0x5382 */
|
||
|
+ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_GET_IDLUN)", ARG3, 2*sizeof(int));
|
||
|
+ break;
|
||
|
+ case VKI_SCSI_IOCTL_GET_BUS_NUMBER: /* 0x5386 */
|
||
|
+ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_GET_BUS_NUMBER)", ARG3, sizeof(int));
|
||
|
+ break;
|
||
|
+
|
||
|
/* CD ROM stuff (??) */
|
||
|
case VKI_CDROM_GET_MCN:
|
||
|
PRE_MEM_READ( "ioctl(CDROM_GET_MCN)", ARG3,
|
||
|
@@ -5521,6 +5533,10 @@ POST(sys_ioctl)
|
||
|
case VKI_SNDRV_TIMER_IOCTL_STOP:
|
||
|
case VKI_SNDRV_TIMER_IOCTL_CONTINUE:
|
||
|
case VKI_SNDRV_TIMER_IOCTL_PAUSE:
|
||
|
+
|
||
|
+ /* SCSI no operand */
|
||
|
+ case VKI_SCSI_IOCTL_DOORLOCK:
|
||
|
+ case VKI_SCSI_IOCTL_DOORUNLOCK:
|
||
|
break;
|
||
|
|
||
|
/* Real Time Clock (/dev/rtc) ioctls */
|
||
|
@@ -5587,6 +5603,14 @@ POST(sys_ioctl)
|
||
|
POST_MEM_WRITE(ARG3, VKI_SIZEOF_STRUCT_HD_DRIVEID );
|
||
|
break;
|
||
|
|
||
|
+ /* SCSI */
|
||
|
+ case VKI_SCSI_IOCTL_GET_IDLUN: /* 0x5382 */
|
||
|
+ POST_MEM_WRITE(ARG3, 2*sizeof(int));
|
||
|
+ break;
|
||
|
+ case VKI_SCSI_IOCTL_GET_BUS_NUMBER: /* 0x5386 */
|
||
|
+ POST_MEM_WRITE(ARG3, sizeof(int));
|
||
|
+ break;
|
||
|
+
|
||
|
/* CD ROM stuff (??) */
|
||
|
case VKI_CDROMSUBCHNL:
|
||
|
POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_subchnl));
|