[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user: Return target error number in do_fo
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user: Return target error number in do_fork() |
Date: |
Sun, 30 Aug 2015 22:53:00 +0100 |
On 30 August 2015 at 20:03, Timothy E Baldwin
<address@hidden> wrote:
> Whilst calls to do_fork() are wrapped in get_errno() this does not
> translate return values.
>
> Signed-off-by: Timothy Edward Baldwin <address@hidden>
> ---
> linux-user/syscall.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index f62c698..bca3424 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -4623,7 +4623,7 @@ static int do_fork(CPUArchState *env, unsigned int
> flags, abi_ulong newsp,
> } else {
> /* if no CLONE_VM, we consider it is a fork */
> if ((flags & ~(CSIGNAL | CLONE_NPTL_FLAGS2)) != 0)
> - return -EINVAL;
> + return -TARGET_EINVAL;
> fork_start();
> ret = fork();
> if (ret == 0) {
Reviewed-by: Peter Maydell <address@hidden>
It would be nice to add the coding-style mandated braces to the
if() since you're touching it anyway, though.
thanks
-- PMM