[Babel-users] [PATCH v3 1/2] Rework sysctl writing to only write when needed.

Toke Høiland-Jørgensen toke at toke.dk
Thu Aug 20 09:06:32 UTC 2015



On 20 August 2015 02:25:19 BST, Juliusz Chroboczek <jch at pps.univ-paris-diderot.fr> wrote:
>> +            if(s->was != s->want) {
>> +                rc = write_proc(s->name, s->want);
>> +                if(rc < 0) {
>> +                    perror("Couldn't write sysctl");
>> +                    return -1;
>> +                }
>> +            }
>
>Shouldn't this say
>
>    rc = write_proc(s->name, s->was);
>
>?

No, this is right I think. On init it should write the "want" value...

>
>> +        for(i=0; i<NUM_SYSCTLS; i++) {
>> +            s = &sysctl_settings[i];
>> +            if(s->was && s->was != s->want) {
>> +                rc = write_proc(s->name,s->want);
>> +                if(rc < 0) {
>> +                    perror("Couldn't write sysctl");
>> +                    return -1;
>> +                }
>
>Same here.

This, however, is a copy/paste goof. Will resubmit...

-Toke



More information about the Babel-users mailing list