[PATCH] size reduction and clean up swaponoff.c

Rob Landley rob at landley.net
Fri Sep 16 19:48:07 UTC 2005


On Friday 16 September 2005 08:13, Mike Frysinger wrote:
> On Friday 16 September 2005 01:32 am, Rob Landley wrote:
> > The patch you attached wasn't the "multiple paths" issue, but the
> > "suppress error" issue.
>
> thats because i committed the 'multiple paths' fix to svn

Cool.

> > (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...
>
> i did play with it, `swapon -a` and `swapoff -a` from util-linux will error
> if fstab lists a path which doesnt exist ... the -a option doesnt suppress
> all errors, just the ones that make sense to supress

Yup.  Unless I'm misreading it, the patch you proposed suppressed all errors 
for the -a case.

> > 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. :)
>
> that'd work for me too

By the way, having looked at the multiple arguments fix, the ret=0 right 
before that isn't currently needed since the ret!=0 case from getopt_ulflags 
returns, so we can only get there right now if it is zero, correct?

> > Speaking of which, is there a spec for this?  It's not in susv3.  Best I
> > can find seems to be the man page...
>
> no idea

We go with the man page, then. :)

Rob



More information about the busybox mailing list