[1.2.x] hdparm -S argument parsing broken
Tito
farmatito at tiscali.it
Wed Aug 2 08:50:13 UTC 2006
On Wednesday 2 August 2006 03:02, Andre wrote:
> Somewhere between 1.1.3 and 1.2.0, hdparm argument parsing seems to
> have got broken:
>
> # busybox
> BusyBox v1.2.1 (2006.08.01-11:01+0000) multi-call binary
>
> # busybox hdparm -S 180 /dev/hda
> hdparm: 180: No such file or directory
>
>
>
Hi,
this is due to the fact that hdparm was ported to getopt for command line
parsing.
Now if an argument of a command line switch is optional it must follow
its switch with no blank space between them:
./busybox hdparm -d1 /dev/hde
/dev/hde:
setting using_dma to 1 (on)
using_dma = 1 (on)
./busybox hdparm -d /dev/hde
/dev/hde:
using_dma = 1 (on)
./busybox hdparm -d 1 /dev/hde
hdparm: 1: No such file or directory
if the argument is required both ways work:
./busybox hdparm -B255 /dev/hde
/dev/hde:
setting APM level to disabled 0xFF (255)
./busybox hdparm -B 255 /dev/hde
/dev/hde:
setting APM level to disabled 0xFF (255)
Ciao,
Tito
More information about the busybox
mailing list