Question for Vodz about getopt_ulflags ([PATCH] inside)
Vladimir N. Oleynik
dzo at simtreas.ru
Wed May 3 11:20:45 UTC 2006
Denis Vlasenko wrote:
> If you have more than 8*sizeof(ulong) options, split them:
>
> opts1 = bb_getopt_ulflags(argc, argv, hdparm_options1);
> opts2 = bb_getopt_ulflags(argc, argv, hdparm_options2);
Its require small changes for bb_getopt_ulflags() too.
I do start think about this.
> static const struct option applet_long_options[] = {
> - { "verbose", 0, 0, v },
> + { "verbose", 0, 0, 'v' },
No. If -v is unaccept or is not eq --verbose, then v should
have 256 or big a value.
> + to be unset (and ignored) if it is given on the command line.
> +
> + [FIXME: what if they are the same? like "x-x"? Is it ever useful?]
"x-x" is a trigger. odd - set, even - unset.
> - Don't forget ':' store. For example "?322-22-23X-x-a" interpretet as
> - "?3:22:-2:2-2:2-3Xa:2--x": max args is 3, count -2 usaged, min args is 2,
> - -2 option triggered, unset -3 and -X and -a if -2 any usaged, give error if
> - after -2 the -x option usaged.
> + Don't forget to use ':'. For example "?322-22-23X-x-a" is interpreted as
> + "?3:22:-2:2-2:2-3Xa:2--x": max 3 args; count uses of '-2'; min 2 args;
> + if there is a '-2' option then unset '-3', '-X' and '-a'; if there is
> + a '-2' and after it a '-x' then error out.
See up.
--w
vodz
More information about the busybox
mailing list