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

Juliusz Chroboczek jch at pps.univ-paris-diderot.fr
Thu Aug 20 01:25:19 UTC 2015


> +            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<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.

-- Juliusz



More information about the Babel-users mailing list