commit 1c49351424f04ee29a5efc054cb08ab3ad22b978 Author: Laurent Bonnans Date: Fri Nov 16 15:22:18 2018 +0100 Fix 397605 - Add support for Linux FICLONE ioctl diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 41849873e..328e02a98 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -7961,6 +7961,11 @@ PRE(sys_ioctl) case VKI_FIBMAP: PRE_MEM_READ( "ioctl(FIBMAP)", ARG3, sizeof(int)); break; + case VKI_FICLONE: + /* The direction of FICLONE (W) is incorrectly specified + * as it expects a file descriptor and not a pointer to + * user data */ + break; case VKI_FBIOGET_VSCREENINFO: /* 0x4600 */ PRE_MEM_WRITE( "ioctl(FBIOGET_VSCREENINFO)", ARG3, @@ -10898,6 +10903,8 @@ POST(sys_ioctl) case VKI_FIBMAP: POST_MEM_WRITE(ARG3, sizeof(int)); break; + case VKI_FICLONE: + break; case VKI_FBIOGET_VSCREENINFO: //0x4600 POST_MEM_WRITE(ARG3, sizeof(struct vki_fb_var_screeninfo)); diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index ef93b9258..3b9dc3779 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -1888,6 +1888,7 @@ struct vki_ppdev_frob_struct { #define VKI_FIBMAP _VKI_IO(0x00,1) /* bmap access */ #define VKI_FIGETBSZ _VKI_IO(0x00,2) /* get the block size used for bmap */ +#define VKI_FICLONE _VKI_IOW(0x94, 9, int) //---------------------------------------------------------------------- // From linux-2.6.8.1/include/scsi/sg.h