From: Sebastian Harl Date: Tue, 9 Dec 2008 11:49:36 +0000 (+0100) Subject: collectd-nagios: Be more verbose before bailing out with usage(). X-Git-Tag: collectd-4.6.0~125 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bc86995088a08d4d355517dd78d3d2b2027bc338;p=collectd.git collectd-nagios: Be more verbose before bailing out with usage(). --- 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 */