superfluous code in gunzip.c?

Robert P. J. Day rpjday at mindspring.com
Fri Mar 3 21:00:13 UTC 2006


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.

rday



More information about the busybox mailing list