[PATCH] size reduction and clean up swaponoff.c
Rob Landley
rob at landley.net
Fri Sep 16 16:01:04 UTC 2005
On Friday 16 September 2005 01:18, Tito wrote:
> On Friday 16 September 2005 06: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:
>
> snip
>
> > 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
>
> Hi,
> maybe we can use your silent-swap.patch to implement
> an optional -v switch?
No, the logic he described makes sense. A swapfile that's already in the
state that swapon -a is trying to put it in is not an error, and the same for
swapoff -a, so those specific errors are selectively suppressed. A -v switch
is something that nobody's ever had call for before, and imagining features
just because we can do it isn't necessarily useful.
The question is whether the extra test to selectively suppress those errors (a
purely cosmetic polishing issue) is worth the extra bytes. Hence the
suggestion of a CONFIG option.
I think that we should probably have the config option (with the disabled case
being the verbose errors and only one command line option we're doing now),
but the error suppression should be specific to just the two errors (swapon
-a when the swap file is already enabled, and swapoff -a when the swap file
is already disabled.) Not suppressing fstab configuration errors ("file not
found"), and so on.
Rob
More information about the busybox
mailing list