tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New getsockopt2() syscall



Commit it then?

christos

> On Jul 30, 2018, at 3:42 AM, Robert Swindells <rjs%fdy2.co.uk@localhost> wrote:
> 
> 
> christos%zoulas.com@localhost (Christos Zoulas) wrote:
>> On Jun 24, 11:18pm, rjs%fdy2.co.uk@localhost (Robert Swindells) wrote:
>> -- Subject: Re: New getsockopt2() syscall
>> 
>> How about merging them thusly?
>> 
>> christos
>> 
>> Index: uipc_syscalls.c
>> ===================================================================
>> RCS file: /cvsroot/src/sys/kern/uipc_syscalls.c,v
>> retrieving revision 1.194
>> diff -u -p -u -r1.194 uipc_syscalls.c
>> --- uipc_syscalls.c    4 May 2018 08:47:55 -0000    1.194
>> +++ uipc_syscalls.c    24 Jun 2018 23:28:14 -0000
>> @@ -1192,18 +1192,10 @@ sys_setsockopt(struct lwp *l, const stru
>>    return error;
>> }
> 
> [snip]
> 
>> +int
>> +sys_getsockopt2(struct lwp *l, const struct sys_getsockopt2_args *uap,
>> +    register_t *retval)
>> +{
>> +    /* {
>> +        syscallarg(int)            s;
>> +        syscallarg(int)            level;
>> +        syscallarg(int)            name;
>> +        syscallarg(void *)        val;
>> +        syscallarg(unsigned int *)    avalsize;
>> +    } */
>> +    return getsockopt(l, uap, retval, true);
>> +}
>> +
>> #ifdef PIPE_SOCKETPAIR
>> 
>> int
> 
> I needed to cast the syscall args to get it to build but other than that
> it does work.
> 
> +int
> +sys_getsockopt2(struct lwp *l, const struct sys_getsockopt2_args *uap,
> +    register_t *retval)
> +{
> +       /* {
> +               syscallarg(int)                 s;
> +               syscallarg(int)                 level;
> +               syscallarg(int)                 name;
> +               syscallarg(void *)              val;
> +               syscallarg(unsigned int *)      avalsize;
> +       } */
> +       return getsockopt(l, (const struct sys_getsockopt_args *) uap, retval, true);
> +}
> +



Home | Main Index | Thread Index | Old Index