linux-user: change do_semop to return target errno when unsuccessful
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Thu, 21 Mar 2013 17:57:36 +0000 (18:57 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 19 Apr 2013 09:42:03 +0000 (11:42 +0200)
commit40508bb424971d9f39f3fb3b455a1765aa7799ee
treea4c955737479467d9887261b46ff371aa54f10f4
parent7f1721dfb7d3a9e464ba59a7d5f76761fd8a3ab9
linux-user: change do_semop to return target errno when unsuccessful

do_semop() is called from two places, and one of these fails to convert
return error to target errno when semop fails. This patch changes the
function to always return target errno in case of an unsuccessful call.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
linux-user/syscall.c