aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-07-12 13:02:14 +0100
committerRiku Voipio <riku.voipio@linaro.org>2016-09-21 14:27:07 +0300
commitf9757b1d9649cb739ecf544c7137c0885281f6e8 (patch)
tree2a592d5f6670612dd72516efb030c22f3e7a0e58 /linux-user
parent3211215e741f6e4824ddfc4919428e8d1b82a3c2 (diff)
downloadqemu-f9757b1d9649cb739ecf544c7137c0885281f6e8.zip
qemu-f9757b1d9649cb739ecf544c7137c0885281f6e8.tar.gz
qemu-f9757b1d9649cb739ecf544c7137c0885281f6e8.tar.bz2
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> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index efcc17a..e286907 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5001,7 +5001,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;