Add support for CDROMREADRAW and fix CDROMREADTOCENTRY to mark the right
number of bytes as defined in the post handler. Fixes bug #126696.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5885 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c
index fc18c46..3054738 100644
--- a/coregrind/m_syswrap/syswrap-generic.c
+++ b/coregrind/m_syswrap/syswrap-generic.c
@@ -3624,6 +3624,10 @@
PRE_MEM_WRITE( "ioctl(CDROMVOLREAD)", ARG3,
sizeof(struct vki_cdrom_volctrl));
break;
+ case VKI_CDROMREADRAW: /* 0x5314 */
+ PRE_MEM_READ( "ioctl(CDROMREADRAW)", ARG3, sizeof(struct vki_cdrom_msf));
+ PRE_MEM_WRITE( "ioctl(CDROMREADRAW)", ARG3, VKI_CD_FRAMESIZE_RAW);
+ break;
case VKI_CDROMREADAUDIO: /* 0x530e */
PRE_MEM_READ( "ioctl(CDROMREADAUDIO)", ARG3,
sizeof (struct vki_cdrom_read_audio));
@@ -4295,7 +4299,7 @@
POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_tochdr));
break;
case VKI_CDROMREADTOCENTRY:
- POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_tochdr));
+ POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_tocentry));
break;
case VKI_CDROMMULTISESSION:
POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_multisession));
@@ -4303,6 +4307,9 @@
case VKI_CDROMVOLREAD:
POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_volctrl));
break;
+ case VKI_CDROMREADRAW:
+ POST_MEM_WRITE(ARG3, VKI_CD_FRAMESIZE_RAW);
+ break;
case VKI_CDROMREADAUDIO:
{
struct vki_cdrom_read_audio *cra = (struct vki_cdrom_read_audio *) ARG3;