From: Tom Hughes Date: Wed, 11 Jul 2012 12:02:06 +0000 (+0000) Subject: Add support for the CDROM_GET_CAPABILITY ioctl based on patch X-Git-Tag: svn/VALGRIND_3_8_0~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b53fdb8ea7e2ad515027c5ecc8caaebf3d86defa;p=thirdparty%2Fvalgrind.git Add support for the CDROM_GET_CAPABILITY ioctl based on patch from Nick Black. Fixes BZ#302827. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12726 --- diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index ba84641b8e..24fcb805e4 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -4771,6 +4771,8 @@ PRE(sys_ioctl) case VKI_CDROM_DRIVE_STATUS: /* 0x5326 */ case VKI_CDROM_CLEAR_OPTIONS: /* 0x5321 */ break; + case VKI_CDROM_GET_CAPABILITY: /* 0x5331 */ + break; case VKI_FIGETBSZ: PRE_MEM_WRITE( "ioctl(FIGETBSZ)", ARG3, sizeof(unsigned long)); @@ -5962,6 +5964,8 @@ POST(sys_ioctl) case VKI_CDROM_DRIVE_STATUS: /* 0x5326 */ case VKI_CDROM_CLEAR_OPTIONS: /* 0x5321 */ break; + case VKI_CDROM_GET_CAPABILITY: /* 0x5331 */ + break; case VKI_FIGETBSZ: POST_MEM_WRITE(ARG3, sizeof(unsigned long)); diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index ec91c9f8bb..5df1b222d4 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -1790,29 +1790,30 @@ struct vki_scsi_idlun { // From linux-2.6.8.1/include/linux/cdrom.h //---------------------------------------------------------------------- -#define VKI_CDROMPLAYMSF 0x5303 /* Play Audio MSF (struct cdrom_msf) */ -#define VKI_CDROMREADTOCHDR 0x5305 /* Read TOC header - (struct cdrom_tochdr) */ -#define VKI_CDROMREADTOCENTRY 0x5306 /* Read TOC entry - (struct cdrom_tocentry) */ -#define VKI_CDROMSUBCHNL 0x530b /* Read subchannel data - (struct cdrom_subchnl) */ -#define VKI_CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes) - (struct cdrom_read) */ -#define VKI_CDROMREADAUDIO 0x530e /* (struct cdrom_read_audio) */ -#define VKI_CDROMMULTISESSION 0x5310 /* Obtain the start-of-last-session - address of multi session disks - (struct cdrom_multisession) */ -#define VKI_CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code" - if available (struct cdrom_mcn) */ -#define VKI_CDROMVOLREAD 0x5313 /* Get the drive's volume setting - (struct cdrom_volctrl) */ -#define VKI_CDROMREADRAW 0x5314 /* read data in raw mode (2352 Bytes) - (struct cdrom_read) */ -#define VKI_CDROM_CLEAR_OPTIONS 0x5321 /* Clear behavior options */ -#define VKI_CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */ - -#define VKI_CDROM_SEND_PACKET 0x5393 /* send a packet to the drive */ +#define VKI_CDROMPLAYMSF 0x5303 /* Play Audio MSF (struct cdrom_msf) */ +#define VKI_CDROMREADTOCHDR 0x5305 /* Read TOC header + (struct cdrom_tochdr) */ +#define VKI_CDROMREADTOCENTRY 0x5306 /* Read TOC entry + (struct cdrom_tocentry) */ +#define VKI_CDROMSUBCHNL 0x530b /* Read subchannel data + (struct cdrom_subchnl) */ +#define VKI_CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes) + (struct cdrom_read) */ +#define VKI_CDROMREADAUDIO 0x530e /* (struct cdrom_read_audio) */ +#define VKI_CDROMMULTISESSION 0x5310 /* Obtain the start-of-last-session + address of multi session disks + (struct cdrom_multisession) */ +#define VKI_CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code" + if available (struct cdrom_mcn) */ +#define VKI_CDROMVOLREAD 0x5313 /* Get the drive's volume setting + (struct cdrom_volctrl) */ +#define VKI_CDROMREADRAW 0x5314 /* read data in raw mode (2352 Bytes) + (struct cdrom_read) */ +#define VKI_CDROM_CLEAR_OPTIONS 0x5321 /* Clear behavior options */ +#define VKI_CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */ +#define VKI_CDROM_GET_CAPABILITY 0x5331 /* get capabilities */ + +#define VKI_CDROM_SEND_PACKET 0x5393 /* send a packet to the drive */ struct vki_cdrom_msf0 {