[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for 2.10 25/35] linux-user: extract is_error() o
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH for 2.10 25/35] linux-user: extract is_error() out of syscall.c |
Date: |
Mon, 24 Jul 2017 21:14:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
Le 24/07/2017 à 20:27, Philippe Mathieu-Daudé a écrit :
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> linux-user/qemu.h | 5 +++++
> linux-user/syscall.c | 5 -----
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/linux-user/qemu.h b/linux-user/qemu.h
> index 4edd7d0c08..97b7cfdb63 100644
> --- a/linux-user/qemu.h
> +++ b/linux-user/qemu.h
> @@ -614,6 +614,11 @@ static inline void *lock_user_string(abi_ulong
> guest_addr)
>
> #include <pthread.h>
>
> +static inline int is_error(abi_long ret)
> +{
> + return (abi_ulong)ret >= (abi_ulong)(-4096);
> +}
> +
> /* Include target-specific struct and function definitions;
> * they may need access to the target-independent structures
> * above, so include them last.
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 003943b736..fcd20fa276 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -837,11 +837,6 @@ static inline abi_long get_errno(abi_long ret)
> return ret;
> }
>
> -static inline int is_error(abi_long ret)
> -{
> - return (abi_ulong)ret >= (abi_ulong)(-4096);
> -}
> -
> const char *target_strerror(int err)
> {
> if (err == TARGET_ERESTARTSYS) {
>
I think you should fold this one into the following one.
Laurent
- Re: [Qemu-devel] [PATCH for 2.10 22/35] arm/vexpress: fix potential memory leak, (continued)
- [Qemu-devel] [PATCH for 2.10 23/35] m68k/translate: fix incorrect copy/paste, Philippe Mathieu-Daudé, 2017/07/24
- [Qemu-devel] [PATCH for 2.10 24/35] linux-user/sh4: fix incorrect memory write, Philippe Mathieu-Daudé, 2017/07/24
- [Qemu-devel] [PATCH for 2.10 25/35] linux-user: extract is_error() out of syscall.c, Philippe Mathieu-Daudé, 2017/07/24
- Re: [Qemu-devel] [PATCH for 2.10 25/35] linux-user: extract is_error() out of syscall.c,
Laurent Vivier <=
- [Qemu-devel] [PATCH for 2.10 26/35] linux-user: use is_error() to avoid warnings and make the code clearer, Philippe Mathieu-Daudé, 2017/07/24
- [Qemu-devel] [PATCH for 2.10 27/35] syscall: fix dereference of undefined pointer, Philippe Mathieu-Daudé, 2017/07/24
- [Qemu-devel] [PATCH for 2.10 28/35] syscall: check dup/dup2/dup3() errors, return EBADFD/EINVAL if required, Philippe Mathieu-Daudé, 2017/07/24
- [Qemu-devel] [PATCH for 2.10 29/35] syscall: fix out-of-bound memory access, Philippe Mathieu-Daudé, 2017/07/24