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>
This commit is contained in:
Peter Maydell 2016-07-12 13:02:14 +01:00 committed by Riku Voipio
parent 3211215e74
commit f9757b1d96
1 changed files with 1 additions and 1 deletions

View File

@ -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;