From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwD9A-0005DC-Cq for qemu-devel@nongnu.org; Sun, 15 Jun 2014 12:19:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwD94-00067b-Mv for qemu-devel@nongnu.org; Sun, 15 Jun 2014 12:19:08 -0400 Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:42483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwD94-00067O-GF for qemu-devel@nongnu.org; Sun, 15 Jun 2014 12:19:02 -0400 Received: by mail-wg0-f49.google.com with SMTP id y10so4687882wgg.32 for ; Sun, 15 Jun 2014 09:19:01 -0700 (PDT) Sender: Paul Burton From: Paul Burton Date: Sun, 15 Jun 2014 17:18:28 +0100 Message-Id: <1402849113-11402-12-git-send-email-paul@archlinuxmips.org> In-Reply-To: <1402849113-11402-1-git-send-email-paul@archlinuxmips.org> References: <1402849113-11402-1-git-send-email-paul@archlinuxmips.org> Subject: [Qemu-devel] [PATCH 11/16] linux-user: support ioprio_{get, set} syscalls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , Paul Burton Add support for the ioprio_get & ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton --- linux-user/syscall.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0830205..c7f176a 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); +#ifdef __NR_ioprio_get +_syscall2(int, ioprio_get, int, which, int, who) +#endif +#ifdef __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, }, @@ -9460,6 +9466,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