mirror of https://gitee.com/openkylin/qemu.git
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:
parent
3211215e74
commit
f9757b1d96
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue