[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/16] linux-user: support ioprio_{get, set} sys
From: |
Riku Voipio |
Subject: |
Re: [Qemu-devel] [PATCH 11/16] linux-user: support ioprio_{get, set} syscalls |
Date: |
Fri, 20 Jun 2014 15:54:51 +0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Jun 15, 2014 at 05:18:28PM +0100, Paul Burton wrote:
> Add support for the ioprio_get & ioprio_set syscalls, allowing their
> use by target programs.
>
> Signed-off-by: Paul Burton <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 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
Since this is only used if both host and guest, thes needs to be
protected by both TARGET_NR_ioprio_get and __NR_ioprio_get. Else we get
compile error on some targets:
qemu/linux-user/syscall.c:256:16: error: ‘ioprio_get’ defined but not used
[-Werror=unused-function]
_syscall2(int, ioprio_get, int, which, int, who)
^
qemu/linux-user/syscall.c:147:13: note: in definition of macro ‘_syscall2’
static type name (type1 arg1,type2 arg2) \
^
> 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
>
- Re: [Qemu-devel] [PATCH 04/16] linux-user: support SO_PASSSEC setsockopt option, (continued)
- [Qemu-devel] [PATCH 05/16] linux-user: allow NULL arguments to mount, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 06/16] linux-user: support strace of epoll_create1, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 07/16] linux-user: fix struct target_epoll_event layout for MIPS, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 08/16] linux-user: respect timezone for settimeofday, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 09/16] linux-user: allow NULL tv argument for settimeofday, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 10/16] linux-user: support timerfd_{create, gettime, settime} syscalls, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 11/16] linux-user: support ioprio_{get, set} syscalls, Paul Burton, 2014/06/15
- Re: [Qemu-devel] [PATCH 11/16] linux-user: support ioprio_{get, set} syscalls,
Riku Voipio <=
- [Qemu-devel] [PATCH 12/16] linux-user: support {name_to, open_by}_handle_at syscalls, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 13/16] linux-user: support the setns syscall, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 15/16] linux-user: support the KDSIGACCEPT ioctl, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 14/16] linux-user: support the unshare syscall, Paul Burton, 2014/06/15
- [Qemu-devel] [PATCH 16/16] linux-user: support the SIOCGIFINDEX ioctl, Paul Burton, 2014/06/15
- Re: [Qemu-devel] [PATCH 00/16] linux-user fixes & improvements, Riku Voipio, 2014/06/17
- Re: [Qemu-devel] [PATCH 00/16] linux-user fixes & improvements, Riku Voipio, 2014/06/21