projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19d9426
)
collectd-nagios: Be more verbose before bailing out with usage().
author
Sebastian Harl
<sh@tokkee.org>
Tue, 9 Dec 2008 11:49:36 +0000
(12:49 +0100)
committer
Sebastian Harl
<sh@tokkee.org>
Tue, 9 Dec 2008 11:49:36 +0000
(12:49 +0100)
src/collectd-nagios.c
patch
|
blob
|
history
diff --git
a/src/collectd-nagios.c
b/src/collectd-nagios.c
index
4e4e494
..
b995b1c
100644
(file)
--- 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 */