Possible misleading help message on command line parameters parsing
Ricardo Jose Maraschini
ricardo.maraschini at opservices.com.br
Tue Sep 4 15:30:40 CEST 2012
I think that we may remove from usage message long options when they are
not supported. Is this OK? Sounds reasonable?
-rm
--- base/nagios.c (revision 2141)
+++ base/nagios.c (working copy)
@@ -389,14 +389,25 @@
printf("\n");
printf("Options:\n");
printf("\n");
+
+#ifdef HAVE_GETOPT_H
printf(" -v, --verify-config Verify all configuration data\n");
printf(" -s, --test-scheduling Shows projected/recommended check scheduling and other\n");
printf(" diagnostic info based on the current configuration files.\n");
- /*printf(" -o, --dont-verify-objects Don't verify object relationships - USE WITH CAUTION!\n");*/
printf(" -x, --dont-verify-paths Don't check for circular object paths - USE WITH CAUTION!\n");
printf(" -p, --precache-objects Precache object configuration - use with -v or -s options\n");
printf(" -u, --use-precached-objects Use precached object config file\n");
printf(" -d, --daemon Starts Nagios in daemon mode, instead of as a foreground process\n");
+#else
+ printf(" -v Verify all configuration data\n");
+ printf(" -s Shows projected/recommended check scheduling and other\n");
+ printf(" diagnostic info based on the current configuration files.\n");
+ printf(" -x Don't check for circular object paths - USE WITH CAUTION!\n");
+ printf(" -p Precache object configuration - use with -v or -s options\n");
+ printf(" -u Use precached object config file\n");
+ printf(" -d Starts Nagios in daemon mode, instead of as a foreground process\n");
+#endif
+
printf("\n");
printf("Visit the Nagios website at http://www.nagios.org/ for bug fixes, new\n");
printf("releases, online documentation, FAQs, information on subscribing to\n");
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
More information about the Developers
mailing list