[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/19] linux-user: support ioprio_{get, set} syscalls
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 14/19] linux-user: support ioprio_{get, set} syscalls |
Date: |
Mon, 23 Jun 2014 16:26:29 +0300 |
From: Paul Burton <address@hidden>
Add support for the ioprio_get & ioprio_set syscalls, allowing their
use by target programs.
Signed-off-by: Paul Burton <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index ca38147..c70b3b0 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, },
@@ -9536,6 +9542,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] [PULL 09/19] linux-user: support strace of epoll_create1, (continued)
- [Qemu-devel] [PULL 09/19] linux-user: support strace of epoll_create1, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 10/19] linux-user: fix struct target_epoll_event layout for MIPS, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 13/19] linux-user: support timerfd_{create, gettime, settime} syscalls, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 01/19] Add support for MAP_NORESERVE mmap flag., riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 17/19] linux-user: support the unshare syscall, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 12/19] linux-user: allow NULL tv argument for settimeofday, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 11/19] linux-user: respect timezone for settimeofday, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 05/19] linux-user: support SO_ACCEPTCONN getsockopt option, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 16/19] linux-user: support the setns syscall, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 07/19] linux-user: support SO_PASSSEC setsockopt option, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 14/19] linux-user: support ioprio_{get, set} syscalls,
riku . voipio <=
- [Qemu-devel] [PULL 15/19] linux-user: support {name_to, open_by}_handle_at syscalls, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 08/19] linux-user: allow NULL arguments to mount, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 06/19] linux-user: support SO_{SND, RCV}BUFFORCE setsockopt options, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 19/19] linux-user: support the SIOCGIFINDEX ioctl, riku . voipio, 2014/06/23
- [Qemu-devel] [PULL 18/19] linux-user: support the KDSIGACCEPT ioctl, riku . voipio, 2014/06/23
- Re: [Qemu-devel] [PULL 00/19] linux-user changes for 2.1, Peter Maydell, 2014/06/23