[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH resend] linux-user: Support the accept4 socketca
From: |
André Hentschel |
Subject: |
Re: [Qemu-devel] [PATCH resend] linux-user: Support the accept4 socketcall |
Date: |
Mon, 06 Jan 2014 16:38:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
> This looks ok, except that scripts/checkpatch.pl says:
>
> WARNING: braces {} are necessary for all arms of this statement
> #36: FILE: linux-user/syscall.c:2254:
> + if (get_user_ual(sockfd, vptr)
> [...]
>
> total: 0 errors, 1 warnings, 30 lines checked
>
> Fix that and I'll be happy to slap a "reviewed-by" sticker on it. Be sure
> to CC me on the fixed version of the patch.
>
>
> Cheers,
> Erik
This warning seems wrong:
- the if statement has no braces and only one arm
- the if statement looks like the others around it, i just try to keep the
same style
Am 06.01.2014 11:21, schrieb Laurent Vivier:
>
>> Le 6 janvier 2014 à 10:14, Peter Maydell <address@hidden> a écrit :
>>
>>
>> On 6 January 2014 08:45, Laurent Vivier <address@hidden> wrote:
>> >
>> >> Le 6 janvier 2014 à 02:57, André Hentschel <address@hidden> a écrit :
>> >> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
>> >> index cf08db5..b36f99c 100644
>> >> --- a/linux-user/syscall_defs.h
>> >> +++ b/linux-user/syscall_defs.h
>> >> @@ -27,6 +27,9 @@
>> >> #define SOCKOP_getsockopt 15
>> >> #define SOCKOP_sendmsg 16
>> >> #define SOCKOP_recvmsg 17
>> >> +#define SOCKOP_accept4 18
>> >> +#define SOCKOP_recvmmsg 19
>> >> +#define SOCKOP_sendmmsg 20
>> >
>> > Don't add these both defines here as they are not used in this patch.
>>
>> It doesn't seem that unreasonable to add them. We add things
>> to the main syscall number #define list even if we aren't
>> actually implementing them, for example.
>
> IMHO, you should not : if you implement these syscalls and then revert this
> patch (because it is broken, for instance), you will break the build. The
> defines must come with the implementation.
good point for removing them and add them separatly.