[BusyBox] [patch] Why busybox xargs is broken.

Rob Landley rob at landley.net
Tue Oct 7 01:41:03 UTC 2003


On Monday 06 October 2003 18:09, Glenn McGrath wrote:
> On Mon, 6 Oct 2003 15:09:00 -0500
>
> Rob Landley <rob at landley.net> wrote:
> > You know, I'm fairly cerrtain the patch I posted had the correct behavior
> > and the infrastructure to add the rest of the posix functionality.  (I
> > banged on it rather a lot to get it that way.)
> >
> > Oh well. :)
>
> Vanity... i thought i could do it better.
>
> Oh well, bnetween the three of us we should be get something perfect.

Oh I'm quite sure somebody could write tighter code than I did.  I was just 
focusing on implementing the full functionality, and infrastructure to do 
more.  (That's why I #ifdefed out all the command line options: get the size 
back down for the 99% of users who never feed any command line arguments to 
xargs.)

> > Glenn: your patch is in cvs now?
>
> Yea, i was pretty confident with it and checked it straight into cvs.

I'll grab a new cvs tarball tomorrow or wednesday.  Right now, I'm going 
through and cleaning up bzDecompress, ripping out that absurd "switch/case 
into the middle of loops, plus snapshotting all the local variables on the 
way in and out" state machine and replacing it with a get_bits() that knows 
how to read from the filehandle and uses longjmp to handle I/O errors, so it 
can just _return_ its result, which simplifies the rest of the code 
_tremendously_ without actually changing anything about the compression 
algorithm.  So when you call bzDecompress it does it, and doesn't return 
untill it hits either the end of a compressed block or an error.

And I'm commenting the heck out of it as I go, too.  (I'm about halfway done, 
but right now it's time for more grad school...)

> Glenn

Rob



More information about the busybox mailing list