From bc86995088a08d4d355517dd78d3d2b2027bc338 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 9 Dec 2008 12:49:36 +0100 Subject: [PATCH] collectd-nagios: Be more verbose before bailing out with usage(). --- src/collectd-nagios.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c index 4e4e494c..b995b1c5 100644 --- a/src/collectd-nagios.c +++ b/src/collectd-nagios.c @@ -617,7 +617,11 @@ int main (int argc, char **argv) else if (strcasecmp (optarg, "percentage") == 0) consolitation_g = CON_PERCENTAGE; else + { + fprintf (stderr, "Unknown consolidation function `%s'.\n", + optarg); usage (argv[0]); + } break; case 'd': { @@ -649,7 +653,10 @@ int main (int argc, char **argv) if ((socket_file_g == NULL) || (value_string_g == NULL) || (hostname_g == NULL)) + { + fprintf (stderr, "Missing required arguments.\n"); usage (argv[0]); + } return (do_check ()); } /* int main */ -- 2.11.0