[PATCH] size reduction and clean up swaponoff.c

Rob Landley rob at landley.net
Wed Sep 14 15:12:32 UTC 2005


On Monday 12 September 2005 21:26, Mike Frysinger wrote:
> unrelated to this patch, and minor overall, but our swap utils different
> from normal in that:
> - normal swap utils accept unlimited paths
>       swapon /dev/hda1 /dev/hda2 /dev/hdb2
> - normal swap utils dont complain when you run with -a
>       swapon -a
>       swapon -a
>       swapoff -a
>       swapoff -a
>
> these are trivial to fix, but they are trivial in and of themselves ...
> anyone think i should bother committing these ?

Hmmm...  The first one's a correctness issue.

The second one is actually that I think we have better error reporting than 
the standard one.  On the other hand, from a usability perspective... It's 
possible for our init to call swapon in low memory situations and then for 
the init scripts to do so on TOP of that, and this probably shouldn't be 
reported as an error...

Testing a bit, swapon /dev/walrus gives an error message, and 
adding /dev/walrus as a swap entry swapon -a also gives an error message, so 
it's definitely specifically suppressing that error...

I can go either way on the second.  Depends how big it is.  By all means, 
please fix the first, that's a correctness issue...

Rob



More information about the busybox mailing list