[PATCH] remove shm* from hdparm
Rob Landley
rob at landley.net
Fri May 19 10:25:06 PDT 2006
On Thursday 18 May 2006 8:40 am, Tito wrote:
> > I'll look at it in the morning, it's midnight and my laptop is STILL
> > backing up. (The downside of having a 60 gig drive...)
>
> Hi, this patch removes shm* stuff from hdparm.c and substitutes it with ~=
>
> RESERVE_CONFIG_BUFFER(buf, TIMING_BUF_BYTES);
> mlock(buf, TIMING_BUF_BYTES);
>
> munlock(buf, TIMING_BUF_BYTES);
> RELEASE_CONFIG_BUFFER(buf);
>
> It seems to work for me.
> Please take a look at it (it's small ;-) ) and apply if you like it.
Rummage rummage...
Removes much code, yay. Hmmm... But should mlock() failing be an abort, or a
warning? I can't do an hdparm -t /dev/hda as a normal user due to
permissions anyway, so I guess...
As long as we've already got a quit: label, gotoing that means we only have
one RELEASE_CONFIG_BUFFER(). (And do we _care_ if munlock() fails? What are
we going to do about it? The program's probably about to exit anyway, so...)
Alright, couple small tweaks and I applied it...
Oh fun. The dependencies for build all sources at once are screwed up.
(build it, touch miscutils/hdparm.c, build it again. Nothing to be done for
_all.)
> > It compares busybox_old with busybox_unstripped. So you need to make the
> > old version, mv busybox_unstripped busybox_old, then make the new
> > version, then make bloatcheck.
> >
> > It doesn't create busybox_old. You have to supply that. It'll create
> > busybox_unstripped if necessary...
>
> Couldn't this be automated by the script
>
> cp busybox_unstripped busybox_old
I believe I replied to that part already...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list