summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b031e2)
raw | patch | inline | side by side (parent: 9b031e2)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 10 Dec 2008 21:08:26 +0000 (22:08 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 10 Dec 2008 21:08:26 +0000 (22:08 +0100) |
This happens if any arguments not starting with a dash are passed to collectd.
Any of those are invalid, so let the user know about that.
Thanks to Kris (gruntruk) for (unknowingly) pointing that out ;-)
Any of those are invalid, so let the user know about that.
Thanks to Kris (gruntruk) for (unknowingly) pointing that out ;-)
src/collectd.c | patch | blob | history |
diff --git a/src/collectd.c b/src/collectd.c
index a3f63b48007336bc48621fa366cbf90a96ccff4c..e8aaed2b21a87352dc10ae11fb201c7a9e35570c 100644 (file)
--- a/src/collectd.c
+++ b/src/collectd.c
} /* switch (c) */
} /* while (1) */
+ if (optind < argc)
+ exit_usage ();
+
/*
* Read options from the config file, the environment and the command
* line (in that order, with later options overwriting previous ones in