weird code snippet in cpio.c
Denys Vlasenko
vda.linux at googlemail.com
Wed Jul 16 20:47:14 UTC 2008
On Wednesday 16 July 2008 20:37, Robert P. J. Day wrote:
>
> from archival/cpio.c:
>
> ...
> #if ENABLE_GETOPT_LONG && ENABLE_DESKTOP
> applet_long_options =
> "extract\0" No_argument "i"
> "list\0" No_argument "t"
> #if ENABLE_FEATURE_CPIO_O
> "create\0" No_argument "o"
> "format\0" Required_argument "H"
> #endif
> ;
> #endif
> ...
>
> why does defining those long options require the definition of
> ENABLE_DESKTOP? the "i" and "t" options will be defined regardless,
> so shouldn't that snippet depend solely on ENABLE_GETOPT_LONG?
I was lazy to add yet another option ENABLE_CPIO_GETOPT_LONG,
as many other applets do.
Sometimes other people submit patches which add such options.
I presume they need more finegrained control.
IOW: xxx_GETOPT_LONG options are added on as-needed basis.
--
vda
More information about the busybox
mailing list