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

2015-08-20 Thread Toke Høiland-Jørgensen


On 20 August 2015 02:25:19 BST, Juliusz Chroboczek 
 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> +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

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


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

2015-08-19 Thread Juliusz Chroboczek
> +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);

?

> +for(i=0; 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.

-- Juliusz

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users