Skip to content

Commit ab31cda

Browse files
paulburtonRiku Voipio
authored and
Riku Voipio
committed
linux-user: support ioprio_{get, set} syscalls
Add support for the ioprio_get & ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton <[email protected]> Signed-off-by: Riku Voipio <[email protected]>
1 parent 5183434 commit ab31cda

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

linux-user/syscall.c

+18
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ _syscall2(int, capget, struct __user_cap_header_struct *, header,
252252
struct __user_cap_data_struct *, data);
253253
_syscall2(int, capset, struct __user_cap_header_struct *, header,
254254
struct __user_cap_data_struct *, data);
255+
#if defined(TARGET_NR_ioprio_get) && defined(__NR_ioprio_get)
256+
_syscall2(int, ioprio_get, int, which, int, who)
257+
#endif
258+
#if defined(TARGET_NR_ioprio_set) && defined(__NR_ioprio_set)
259+
_syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
260+
#endif
255261

256262
static bitmask_transtbl fcntl_flags_tbl[] = {
257263
{ TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, },
@@ -9592,6 +9598,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
95929598
break;
95939599
#endif
95949600

9601+
#if defined(TARGET_NR_ioprio_get) && defined(__NR_ioprio_get)
9602+
case TARGET_NR_ioprio_get:
9603+
ret = get_errno(ioprio_get(arg1, arg2));
9604+
break;
9605+
#endif
9606+
9607+
#if defined(TARGET_NR_ioprio_set) && defined(__NR_ioprio_set)
9608+
case TARGET_NR_ioprio_set:
9609+
ret = get_errno(ioprio_set(arg1, arg2, arg3));
9610+
break;
9611+
#endif
9612+
95959613
default:
95969614
unimplemented:
95979615
gemu_log("qemu: Unsupported syscall: %d\n", num);

0 commit comments

Comments
 (0)