[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 1/6] linux-user: Fix support for SIOCATMARK and S
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PATCH v6 1/6] linux-user: Fix support for SIOCATMARK and SIOCGPGRP ioctls for xtensa |
Date: |
Sun, 19 May 2019 18:15:22 +0200 |
From: Aleksandar Markovic <address@hidden>
Fix support for the SIOCATMARK and SIOCGPGRP ioctls for xtensa by
correcting corresponding macro definition.
Values for TARGET_SIOCATMARK and TARGET_SIOCGPGRP are determined by
Linux kernel. Following relevant lines (obtained by grep) are from
the kernel source tree:
arch/ia64/include/uapi/asm/sockios.h:#define SIOCATMARK 0x8905
arch/mips/include/uapi/asm/sockios.h:#define SIOCATMARK _IOR('s', 7, int)
arch/parisc/include/uapi/asm/sockios.h:#define SIOCATMARK 0x8905
arch/sh/include/uapi/asm/sockios.h:#define SIOCATMARK _IOR('s', 7, int)
arch/xtensa/include/uapi/asm/sockios.h:#define SIOCATMARK _IOR('s', 7, int)
arch/alpha/include/uapi/asm/sockios.h:#define SIOCATMARK _IOR('s', 7, int)
arch/sparc/include/uapi/asm/sockios.h:#define SIOCATMARK 0x8905
include/uapi/asm-generic/sockios.h:#define SIOCATMARK 0x8905
arch/ia64/include/uapi/asm/sockios.h:#define SIOCGPGRP 0x8904
arch/mips/include/uapi/asm/sockios.h:#define SIOCGPGRP _IOR('s', 9, pid_t)
arch/parisc/include/uapi/asm/sockios.h:#define SIOCGPGRP 0x8904
arch/sh/include/uapi/asm/sockios.h:#define SIOCGPGRP _IOR('s', 9, pid_t)
arch/xtensa/include/uapi/asm/sockios.h:#define SIOCGPGRP _IOR('s', 9, pid_t)
arch/alpha/include/uapi/asm/sockios.h:#define SIOCGPGRP _IOR('s', 9, pid_t)
arch/sparc/include/uapi/asm/sockios.h:#define SIOCGPGRP 0x8904
include/uapi/asm-generic/sockios.h:#define SIOCGPGRP 0x8904
It is visible from above that xtensa should have the same definitions
as alpha, mips and sh4 already do. This patch brings QEMU to the accurate
state wrt these two ioctls.
Acked-by: Max Filippov <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
---
linux-user/syscall_defs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 12c8407..1e86fb9 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -736,7 +736,8 @@ struct target_pollfd {
#define TARGET_KDSETLED 0x4B32 /* set led state [lights, not flags] */
#define TARGET_KDSIGACCEPT 0x4B4E
-#if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SH4)
+#if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SH4) ||
\
+ defined(TARGET_XTENSA)
#define TARGET_SIOCATMARK TARGET_IOR('s', 7, int)
#define TARGET_SIOCGPGRP TARGET_IOR('s', 9, pid_t)
#else
--
2.7.4
- [Qemu-devel] [PATCH v6 0/6] linux-user: A set of miscellaneous patches, Aleksandar Markovic, 2019/05/19
- [Qemu-devel] [PATCH v6 1/6] linux-user: Fix support for SIOCATMARK and SIOCGPGRP ioctls for xtensa,
Aleksandar Markovic <=
- [Qemu-devel] [PATCH v6 2/6] linux-user: Add support for SIOCSPGRP ioctl for all targets, Aleksandar Markovic, 2019/05/19
- [Qemu-devel] [PATCH v6 3/6] linux-user: Add support for SIOC<G|S>IFPFLAGS ioctls for all targets, Aleksandar Markovic, 2019/05/19
- [Qemu-devel] [PATCH v6 4/6] linux-user: Add support for setsockopt() options IPV6_<ADD|DROP>_MEMBERSHIP, Aleksandar Markovic, 2019/05/19
- [Qemu-devel] [PATCH v6 5/6] linux-user: Sanitize interp_info and, for mips only, init field fp_abi, Aleksandar Markovic, 2019/05/19