diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-09-06 10:36:39 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-09-06 10:36:39 +0100 |
commit | 83a5805c16f73314a806c14a1c8796319b2277bb (patch) | |
tree | a8cfed533917a3d5f5a219b2baf5aac93f4c3d25 | |
parent | 17acc09c9674a1dbb2fdf53de85870e386faeef8 (diff) |
linux-user: Fix incorrect use of host errno in do_ioctl_dm()
do_ioctl_dm() should return target errno values, not host ones;
correct an accidental use of a host errno in an error path.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | linux-user/syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 6630f74a16..3a5bf33815 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5027,7 +5027,7 @@ static abi_long do_ioctl_dm(const IOCTLEntry *ie, uint8_t *buf_temp, int fd, guest_data = arg + host_dm->data_start; if ((guest_data - arg) < 0) { - ret = -EINVAL; + ret = -TARGET_EINVAL; goto out; } guest_data_size = host_dm->data_size - host_dm->data_start; |