[PATCH] remove dead code from hdparm

Tito farmatito at tiscali.it
Fri Apr 28 18:33:40 UTC 2006


On Friday 28 April 2006 15:40, you wrote:
> Hi Tito,
> 
> On Friday 28 April 2006 16:20, Tito wrote:
> > Hi,
> > This patch, to be applied on top of the previous (kernel headers patch)
> > removes a chunk of dead code from hdparm.c (i emailed also the
> > hdparm maintainer about this). 
> 
> I'm sorry I didn't notice this thread before.
> 
> There are hdparm*.patch files at http://195.66.192.167/linux/bbox/,
> some of them can shave off a few bytes.
> 
> Each one has small comment at the top:
> 
> hdparm.patch
> 
> Make hdparm smaller:
> * Use combined no_scsi_no_xt()
> * Have common unsigned char args[4] = {WIN_SETFEATURES,0,0,0};
> 
> hdparm2.patch
> 
> Make hdparm smaller:
> * Make bb_ioctl return the status
> * Replace ioctl with bb_ioctl in a few places
> * Add bb_ioctl_alt, use where appropriate (four places)
> * unsigned char args1[4+512] = {WIN_IDENTIFY,0,0,1,};
>   ate 0.5k of rodata, fix that
> 
> hdparm3.patch
> 
> Style fixes
> 
> hdparm4.patch
> 
> * Style fixes
> * Rewrite largish if(), while() and switch() statements so that
>   they are much less indented
> 
> You may want to incorporate some of this into your patches,
> especially that thing about extra 0.5k for
> "unsigned char args1[4+512] = {WIN_IDENTIFY,0,0,1,};"
> --
> vda
> --
> vda
> 

Fine I'll test, rediff and repost the patches as soon as
the previous 2 are applied.

Ciao,
Tito



More information about the busybox mailing list