[PATCH] hdparm size reduction
Rob Landley
rob at landley.net
Wed May 3 18:13:36 UTC 2006
On Wednesday 03 May 2006 2:46 am, Tito wrote:
> > > Here it is: hdparm07.patch!!!
> >
> > My if (BB_BIG_ENDIAN) hunk was there to avoid the memcpy when we didn't
> > need to do it. (Hopefully the compiler is smart enough to realize that
> > val can optimized away when it's just an alias for another variable.)
> >
> > You removed that. Was there a reason?
>
> Just copy and paste from hdparm 6.6+
The other thing is that the big endian test was doing a swab before, and now
it isn't. You still have a buffer, but you always memcpy straight to the
buffer unmodified. So either your hdparm07 breaks big endian systems, or the
swab was unnecessarily (strongly inplying that the _old_ hdparm wouldn't have
worked on big endian systems).
I'm going to guess that the old one worked and the swab is still necessary.
Care to express an opinion?
I should set up an ubuntu PPC system under qemu so I can test this...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list