]> Git Repo - qemu.git/commit
linux-user: fix mq_getsetattr implementation
authorMax Filippov <[email protected]>
Sat, 31 Mar 2018 15:20:15 +0000 (08:20 -0700)
committerMax Filippov <[email protected]>
Sat, 31 Mar 2018 21:06:36 +0000 (14:06 -0700)
commita23ea409824afb9bce3a4d54881310757811c218
tree856bd6570aec3eeb9560f9212bf605886c2a1515
parent73a988d957b9142e0a005f4dc87944574f02de51
linux-user: fix mq_getsetattr implementation

mq_getsetattr implementation does not set errno correctly in case of
error. Also in the presence of both 2nd and 3rd arguments it calls both
mq_getattr and mq_setattr, whereas only the latter call would suffice.

Don't call mq_getattr in the presence of the 2nd argument. Don't copy
output back to user in case of error. Use get_errno to set errno value.

This fixes test rt/tst-mqueue2 from the glibc testsuite.

Cc: Lionel Landwerlin <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Riku Voipio <[email protected]>
Cc: Aurelien Jarno <[email protected]>
Cc: Laurent Vivier <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Signed-off-by: Max Filippov <[email protected]>
linux-user/syscall.c
This page took 0.019875 seconds and 4 git commands to generate.