Hi, guys. This is my first post, so please let me know if I'm doing this wrong.
There seems to be a bug in the current busybox "hdparm" applet.
Here is an example of the problem ...
[EMAIL PROTECTED]:/usr/src/busybox-1.8.2/_install/bin# ./busybox
hdparm /dev/hda
/dev/hda:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
hdparm: HDIO_GET_UNMASKINTR: Bad address
using_dma = 1 (on)
hdparm: HDIO_GET_KEEPSETTINGS: Bad address
hdparm: BLKROGET: Bad address
hdparm: BLKRAGET: Bad address
geometry = 30515/255/63, sectors = 490234752, start =
0
I’ve tracked it down to a bunch of calls in miscutils/hdparm.c like ...
if(!ioctl_or_warn(fd, HDIO_GET_UNMASKINTR, (unsigned long
*)parm))
instead of ...
if(!ioctl_or_warn(fd, HDIO_GET_UNMASKINTR, &parm))
I've patched all the suspect function calls, and now get the proper result
...
[EMAIL PROTECTED]:/usr/src/busybox-1.8.2/_install/bin# ./busybox
hdparm /dev/hda
/dev/hda:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 30515/255/63, sectors = 490234752, start =
0
I've looked back as far as the busybox 1.6.2 release, and the problem goes
back at least that long.
I'm attaching a patch that works for the 1.7.4, 1.8.2, 1.9.0 and current
source trees.
The problem also appears in the 1.6.2 source, but the source code changes in
miscutils/hdparm.c between 1.6.2 and 1.7 were too great for the patch to
apply successfully.
Thanks,
John Brandwood
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.2/1221 - Release Date: 1/12/2008
2:04 PM
busybox-1.8.2-hdparm.patch
Description: Binary data
_______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
