[PATCH] size reduction and clean up swaponoff.c
Rob Landley
rob at landley.net
Fri Sep 16 05:32:52 UTC 2005
On Thursday 15 September 2005 23:50, Mike Frysinger wrote:
> On Wednesday 14 September 2005 11:12 am, Rob Landley wrote:
> > 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.
>
> fixed ... only added like 20 bytes to the object file :)
The patch you attached wasn't the "multiple paths" issue, but the "suppress
error" issue. (And the patch gets it wrong: only the "already on" or
"already off" errors are suppressed. Something like file not found is not
suppressed (by swapon, at least).) Play with the util-linux version a bit...
Now admittedly we could skip both in the name of size. What we might want to
do is have a CONFIG option to enable these two extra features for people who
want to replace util-linux with busybox in a real system. (Like me. :)
> the behavior (afaictl) is that the -a arguments will not report an error if
> the swap device is in the proper state ...
Which seems sane behavior. Admittedly it's a polishing step, but that's why I
can see a CONFIG option for it. (Each feature by itself is a bit small for
a config option, but the two together I can see.)
> we're talking a rough range of 30-40 additional bytes on an amd64 host ...
> it isnt a feature i would require in busybox considering it's merely
> cosmetic one, but i would require in the 'full' featured one from
> util-linux -mike
I want busybox to be able to replace the gnu tools. (Doesn't mean we have to
implement everything they do, but in this case it seems to me we're not up to
spec.)
Speaking of which, is there a spec for this? It's not in susv3. Best I can
find seems to be the man page...
Rob
More information about the busybox
mailing list