[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 11/16] linux-user: support ioprio_{get, set} sysc
From: |
Paul Burton |
Subject: |
[Qemu-devel] [PATCH v3 11/16] linux-user: support ioprio_{get, set} syscalls |
Date: |
Sun, 22 Jun 2014 11:25:43 +0100 |
Add support for the ioprio_get & ioprio_set syscalls, allowing their
use by target programs.
Signed-off-by: Paul Burton <address@hidden>
---
Changes in v3:
- None.
Changes in v2:
- Declare the host syscalls conditionally upon whether both host &
target define their numbers, to avoid compile time warnings/errors
about the host syscall functions being unused when built for targets
which don't support them.
---
linux-user/syscall.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 0d8cd0b..f90dd99 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -252,6 +252,12 @@ _syscall2(int, capget, struct __user_cap_header_struct *,
header,
struct __user_cap_data_struct *, data);
_syscall2(int, capset, struct __user_cap_header_struct *, header,
struct __user_cap_data_struct *, data);
+#if defined(TARGET_NR_ioprio_get) && defined(__NR_ioprio_get)
+_syscall2(int, ioprio_get, int, which, int, who)
+#endif
+#if defined(TARGET_NR_ioprio_set) && defined(__NR_ioprio_set)
+_syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
+#endif
static bitmask_transtbl fcntl_flags_tbl[] = {
{ TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, },
@@ -9488,6 +9494,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
arg1,
break;
#endif
+#if defined(TARGET_NR_ioprio_get) && defined(__NR_ioprio_get)
+ case TARGET_NR_ioprio_get:
+ ret = get_errno(ioprio_get(arg1, arg2));
+ break;
+#endif
+
+#if defined(TARGET_NR_ioprio_set) && defined(__NR_ioprio_set)
+ case TARGET_NR_ioprio_set:
+ ret = get_errno(ioprio_set(arg1, arg2, arg3));
+ break;
+#endif
+
default:
unimplemented:
gemu_log("qemu: Unsupported syscall: %d\n", num);
--
2.0.0
- [Qemu-devel] [PATCH v3 01/16] linux-user: translate the result of getsockopt SO_TYPE, (continued)
- [Qemu-devel] [PATCH v3 01/16] linux-user: translate the result of getsockopt SO_TYPE, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 02/16] linux-user: support SO_ACCEPTCONN getsockopt option, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 03/16] linux-user: support SO_{SND, RCV}BUFFORCE setsockopt options, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 05/16] linux-user: allow NULL arguments to mount, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 06/16] linux-user: support strace of epoll_create1, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 04/16] linux-user: support SO_PASSSEC setsockopt option, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 09/16] linux-user: allow NULL tv argument for settimeofday, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 07/16] linux-user: fix struct target_epoll_event layout for MIPS, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 10/16] linux-user: support timerfd_{create, gettime, settime} syscalls, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 08/16] linux-user: respect timezone for settimeofday, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 11/16] linux-user: support ioprio_{get, set} syscalls,
Paul Burton <=
- [Qemu-devel] [PATCH v3 12/16] linux-user: support {name_to, open_by}_handle_at syscalls, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 13/16] linux-user: support the setns syscall, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 15/16] linux-user: support the KDSIGACCEPT ioctl, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 14/16] linux-user: support the unshare syscall, Paul Burton, 2014/06/22
- [Qemu-devel] [PATCH v3 16/16] linux-user: support the SIOCGIFINDEX ioctl, Paul Burton, 2014/06/22