syslogd_main & getopt
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Sun Oct 16 21:25:34 UTC 2005
Given the ifdefs below this line:
while ((opt = getopt(argc, argv, "m:nO:s:Sb:R:LC::")) > 0) {
shouldn't it be rewritten similar to:
while ((opt = getopt(argc, argv, "m:nO:S"
#ifdef CONFIG_FEATURE_ROTATE_LOGFILE
"s:b:"
#endif
#ifdef CONFIG_FEATURE_REMOTE_LOG
"R:L"
#endif
#ifdef CONFIG_FEATURE_IPC_SYSLOG
"C::"
#endif
)) > 0) {
The way it currently behaves is confusing :( Options depending on ifdefs
are accepted, although they do nothing useful.
usage.h needs some attention too. CONFIG_FEATURE_...LOG defines should be
moved below the 'sysctl_trivial_usage' block.
Cheers,
Cristian
More information about the busybox
mailing list