Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic <amarko...@wavecomp.com> > > FIOGETOWN and FIOSETOWN ioctls have platform-specific definitions, > hence non-standard definition in QEMU too. > > Other than that, they both have a single integer argument, and their > functionality is emulated in a straightforward way. > > Signed-off-by: Aleksandar Markovic <amarko...@wavecomp.com> > --- > linux-user/ioctls.h | 2 ++ > linux-user/syscall_defs.h | 4 ++++ > 2 files changed, 6 insertions(+) > > diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h > index cd9b6f9..1830de9 100644 > --- a/linux-user/ioctls.h > +++ b/linux-user/ioctls.h > @@ -177,6 +177,8 @@ > #endif > #endif /* CONFIG_USBFS */ > > + IOCTL(FIOGETOWN, IOC_R, MK_PTR(TYPE_INT)) > + IOCTL(FIOSETOWN, IOC_W, MK_PTR(TYPE_INT)) > IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT)) > IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq))) > IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq))) > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h > index 19a1d39..498223b 100644 > --- a/linux-user/syscall_defs.h > +++ b/linux-user/syscall_defs.h > @@ -758,10 +758,14 @@ struct target_pollfd { > > #if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SH4) || > \ > defined(TARGET_XTENSA) > +#define TARGET_FIOGETOWN TARGET_IOR('f', 123, int) > +#define TARGET_FIOSETOWN TARGET_IOW('f', 124, int) > #define TARGET_SIOCATMARK TARGET_IOR('s', 7, int) > #define TARGET_SIOCSPGRP TARGET_IOW('s', 8, pid_t) > #define TARGET_SIOCGPGRP TARGET_IOR('s', 9, pid_t) > #else > +#define TARGET_FIOGETOWN 0x8903 > +#define TARGET_FIOSETOWN 0x8901 > #define TARGET_SIOCATMARK 0x8905 > #define TARGET_SIOCSPGRP 0x8902 > #define TARGET_SIOCGPGRP 0x8904 >
Reviewed-by: Laurent Vivier <laur...@vivier.eu>