Question for Vodz about getopt_ulflags
Tito
farmatito at tiscali.it
Wed May 3 03:13:42 PDT 2006
Hi Vodz,
I am trying to use bb_getopt_ulflags in hdparm,
but it seems to me that unsigned long opts
returned by bb_getopt_ulflags is not big enough
to hold the value for all the options.
For test:
int hdparm_main(int argc, char **argv)
{
unsigned long opts;
opts = bb_getopt_ulflags(argc, argv, hdparm_options);
printf("opts %ld\n", opts);
return 0;
}
./busybox hdparm -Z
opts 1073741824
./busybox hdparm -U
opts -2147483648
./busybox hdparm -R
BusyBox v1.2.0-pre0 (2006.04.28-12:28+0000) multi-call binary
Usage: hdparm [options] [device] ..
The opt strings is:
static const char hdparm_options[]= "VvgfqunprmckaBtThdSDPXKALWCyYzZURQwxb";
Is there a solution?
Ciao,
Tito
More information about the busybox
mailing list