superfluous code in gunzip.c?

Rob Landley rob at landley.net
Fri Mar 3 21:09:18 UTC 2006


On Friday 03 March 2006 4:00 pm, Robert P. J. Day wrote:
> On Fri, 3 Mar 2006, Rob Landley wrote:
> > You'll notice that the gnu versions of gzip and gunzip use the same
> > kind of trick busybox does, the two binaries are symlinked together.
> >
> > If the name "gunzip" is given, it defaults to decompressing.  The -d
> > option is there so "gzip -d" can decompress, but since both gzip and
> > gunzip have exactly the same options you can give it to gunzip too
> > (in which case it will be ignored).  Some scripts, for whatever
> > reason, do this.  (You'd think the FSF would have put in a
> > corresponding "Compress when called as gunzip" command line option.
> > As far as I can tell, you'd be wrong.)
> >
> > So having -d accepted but ignored by our gunzip makes some (arguably
> > broken) scripts happy, at the cost of one byte.  No point in adding
> > it to the usage, since it doesn't do anything.
>
> sigh.  maybe i'll just give up while i'm behind.  it's friday.  time
> to go home and drink heavily.

Hey, it's good to re-examine this stuff.  Everything in busybox is open to 
improvement, and the stuff we can't currently improve we should document, so 
anybody smarter than we are who comes along can figure out where we went 
wrong. :)

> rday

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list