diff options
author | Timothy Baldwin | 2020-07-29 22:06:44 +0200 |
---|---|---|
committer | Laurent Vivier | 2020-09-06 12:29:16 +0200 |
commit | a7b4c9b1b411a8d54882e75c046b026a7a9754f9 (patch) | |
tree | 217f573c2bd36f73041a925eeaf2ab6f704092f7 /linux-user | |
parent | linux-user: Correctly start brk after executable (diff) | |
download | qemu-a7b4c9b1b411a8d54882e75c046b026a7a9754f9.tar.gz qemu-a7b4c9b1b411a8d54882e75c046b026a7a9754f9.tar.xz qemu-a7b4c9b1b411a8d54882e75c046b026a7a9754f9.zip |
linux-user: Map signal numbers in fcntl
Map signal numbers in fcntl F_SETSIG and F_GETSIG.
Signed-off-by: Timothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <72cc725c-f344-b7f1-d559-401867067d80@members.leeds.ac.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 07220eee40..55ac5c3208 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6874,10 +6874,16 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) break; #endif - case TARGET_F_SETOWN: - case TARGET_F_GETOWN: case TARGET_F_SETSIG: + ret = get_errno(safe_fcntl(fd, host_cmd, target_to_host_signal(arg))); + break; + case TARGET_F_GETSIG: + ret = host_to_target_signal(get_errno(safe_fcntl(fd, host_cmd, arg))); + break; + + case TARGET_F_SETOWN: + case TARGET_F_GETOWN: case TARGET_F_SETLEASE: case TARGET_F_GETLEASE: case TARGET_F_SETPIPE_SZ: |