diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-08 16:33:15 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-08 16:33:15 +0000 |
commit | 4e366f82dee33c2f9a2e781d77144b2cf76d7c51 (patch) | |
tree | f94f43282102fa89aa11a595ae03387d9c84d040 | |
parent | 4bdb362b6126803f86373ebf181925b86d85f0fc (diff) | |
download | monitoring-plugins-4e366f82dee33c2f9a2e781d77144b2cf76d7c51.tar.gz |
Fix long options parsing in check_disk, check_dns, check_mrtg and check_mrtgtraf (check_tcp was done in an earlier commit)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2078 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | plugins/check_disk.c | 4 | ||||
-rw-r--r-- | plugins/check_dns.c | 4 | ||||
-rw-r--r-- | plugins/check_ide_smart.c | 3 | ||||
-rw-r--r-- | plugins/check_mrtg.c | 4 | ||||
-rw-r--r-- | plugins/check_mrtgtraf.c | 8 | ||||
-rw-r--r-- | plugins/check_mysql_query.c | 2 | ||||
-rw-r--r-- | plugins/check_nt.c | 2 |
8 files changed, 14 insertions, 15 deletions
@@ -11,7 +11,7 @@ This file documents the major additions and syntax changes between releases. | |||
11 | Extra-opts (C plugins) does not allow trailing comments anymore (like N::P) | 11 | Extra-opts (C plugins) does not allow trailing comments anymore (like N::P) |
12 | Fixed dependency issue on libtap when ./configure --enable-libtap used. Warning: will install libtap | 12 | Fixed dependency issue on libtap when ./configure --enable-libtap used. Warning: will install libtap |
13 | Fixed segfault in extra-opts under some circumstance when reading multiple sections | 13 | Fixed segfault in extra-opts under some circumstance when reading multiple sections |
14 | Fix long options parsing in check_tcp | 14 | Fix long options parsing in check_disk, check_dns, check_mrtg, check_mrtgtraf and check_tcp. |
15 | check_icmp now reports min and max round trip time perfdata (Steve Rader) | 15 | check_icmp now reports min and max round trip time perfdata (Steve Rader) |
16 | Fixed bug where additional headers with redirection caused a segfault (Dieter Van de Walle - 2089159) | 16 | Fixed bug where additional headers with redirection caused a segfault (Dieter Van de Walle - 2089159) |
17 | 17 | ||
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 7f5c0096..2f8afa6c 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -477,8 +477,8 @@ process_arguments (int argc, char **argv) | |||
477 | {"iwarning", required_argument, 0, 'W'}, | 477 | {"iwarning", required_argument, 0, 'W'}, |
478 | /* Dang, -C is taken. We might want to reshuffle this. */ | 478 | /* Dang, -C is taken. We might want to reshuffle this. */ |
479 | {"icritical", required_argument, 0, 'K'}, | 479 | {"icritical", required_argument, 0, 'K'}, |
480 | {"kilobytes", required_argument, 0, 'k'}, | 480 | {"kilobytes", no_argument, 0, 'k'}, |
481 | {"megabytes", required_argument, 0, 'm'}, | 481 | {"megabytes", no_argument, 0, 'm'}, |
482 | {"units", required_argument, 0, 'u'}, | 482 | {"units", required_argument, 0, 'u'}, |
483 | {"path", required_argument, 0, 'p'}, | 483 | {"path", required_argument, 0, 'p'}, |
484 | {"partition", required_argument, 0, 'p'}, | 484 | {"partition", required_argument, 0, 'p'}, |
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index c2d899fd..19206c2c 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c | |||
@@ -340,8 +340,8 @@ process_arguments (int argc, char **argv) | |||
340 | {"reverse-server", required_argument, 0, 'r'}, | 340 | {"reverse-server", required_argument, 0, 'r'}, |
341 | {"expected-address", required_argument, 0, 'a'}, | 341 | {"expected-address", required_argument, 0, 'a'}, |
342 | {"expect-authority", no_argument, 0, 'A'}, | 342 | {"expect-authority", no_argument, 0, 'A'}, |
343 | {"warning", no_argument, 0, 'w'}, | 343 | {"warning", required_argument, 0, 'w'}, |
344 | {"critical", no_argument, 0, 'c'}, | 344 | {"critical", required_argument, 0, 'c'}, |
345 | {0, 0, 0, 0} | 345 | {0, 0, 0, 0} |
346 | }; | 346 | }; |
347 | 347 | ||
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c index 02f07c01..b0a7ef6c 100644 --- a/plugins/check_ide_smart.c +++ b/plugins/check_ide_smart.c | |||
@@ -173,7 +173,8 @@ main (int argc, char *argv[]) | |||
173 | {"auto-off", no_argument, 0, '0'}, | 173 | {"auto-off", no_argument, 0, '0'}, |
174 | {"nagios", no_argument, 0, 'n'}, | 174 | {"nagios", no_argument, 0, 'n'}, |
175 | {"help", no_argument, 0, 'h'}, | 175 | {"help", no_argument, 0, 'h'}, |
176 | {"version", no_argument, 0, 'V'}, {0, 0, 0, 0} | 176 | {"version", no_argument, 0, 'V'}, |
177 | {0, 0, 0, 0} | ||
177 | }; | 178 | }; |
178 | 179 | ||
179 | setlocale (LC_ALL, ""); | 180 | setlocale (LC_ALL, ""); |
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index 80e52155..62b0cf08 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c | |||
@@ -181,7 +181,7 @@ process_arguments (int argc, char **argv) | |||
181 | {"warning", required_argument, 0, 'w'}, | 181 | {"warning", required_argument, 0, 'w'}, |
182 | {"label", required_argument, 0, 'l'}, | 182 | {"label", required_argument, 0, 'l'}, |
183 | {"units", required_argument, 0, 'u'}, | 183 | {"units", required_argument, 0, 'u'}, |
184 | {"verbose", no_argument, 0, 'v'}, | 184 | {"variable", required_argument, 0, 'v'}, |
185 | {"version", no_argument, 0, 'V'}, | 185 | {"version", no_argument, 0, 'V'}, |
186 | {"help", no_argument, 0, 'h'}, | 186 | {"help", no_argument, 0, 'h'}, |
187 | {0, 0, 0, 0} | 187 | {0, 0, 0, 0} |
@@ -334,7 +334,7 @@ print_help (void) | |||
334 | 334 | ||
335 | printf (" %s\n", "-F, --logfile=FILE"); | 335 | printf (" %s\n", "-F, --logfile=FILE"); |
336 | printf (" %s\n", _("The MRTG log file containing the data you want to monitor")); | 336 | printf (" %s\n", _("The MRTG log file containing the data you want to monitor")); |
337 | printf ("-e, --expires=MINUTES"); | 337 | printf (" %s\n", "-e, --expires=MINUTES"); |
338 | printf (" %s\n", _("Minutes before MRTG data is considered to be too old")); | 338 | printf (" %s\n", _("Minutes before MRTG data is considered to be too old")); |
339 | printf (" %s\n", "-a, --aggregation=AVG|MAX"); | 339 | printf (" %s\n", "-a, --aggregation=AVG|MAX"); |
340 | printf (" %s\n", _("Should we check average or maximum values?")); | 340 | printf (" %s\n", _("Should we check average or maximum values?")); |
diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index b9716164..1911d568 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c | |||
@@ -223,13 +223,11 @@ process_arguments (int argc, char **argv) | |||
223 | 223 | ||
224 | int option = 0; | 224 | int option = 0; |
225 | static struct option longopts[] = { | 225 | static struct option longopts[] = { |
226 | {"logfile", required_argument, 0, 'F'}, | 226 | {"filename", required_argument, 0, 'F'}, |
227 | {"expires", required_argument, 0, 'e'}, | 227 | {"expires", required_argument, 0, 'e'}, |
228 | {"aggregation", required_argument, 0, 'a'}, | 228 | {"aggregation", required_argument, 0, 'a'}, |
229 | {"variable", required_argument, 0, 'v'}, | ||
230 | {"critical", required_argument, 0, 'c'}, | 229 | {"critical", required_argument, 0, 'c'}, |
231 | {"warning", required_argument, 0, 'w'}, | 230 | {"warning", required_argument, 0, 'w'}, |
232 | {"verbose", no_argument, 0, 'v'}, | ||
233 | {"version", no_argument, 0, 'V'}, | 231 | {"version", no_argument, 0, 'V'}, |
234 | {"help", no_argument, 0, 'h'}, | 232 | {"help", no_argument, 0, 'h'}, |
235 | {0, 0, 0, 0} | 233 | {0, 0, 0, 0} |
@@ -385,6 +383,6 @@ void | |||
385 | print_usage (void) | 383 | print_usage (void) |
386 | { | 384 | { |
387 | printf (_("Usage")); | 385 | printf (_("Usage")); |
388 | printf (" %s -F <log_file> -a <AVG | MAX> -v <variable> -w <warning_pair>",progname); | 386 | printf (" %s -F <log_file> -a <AVG | MAX> -w <warning_pair>\n",progname); |
389 | printf ("-c <critical_pair> [-e expire_minutes] [-t timeout] [-v]\n"); | 387 | printf ("-c <critical_pair> [-e expire_minutes]\n"); |
390 | } | 388 | } |
diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c index e887bca2..a92b8570 100644 --- a/plugins/check_mysql_query.c +++ b/plugins/check_mysql_query.c | |||
@@ -192,7 +192,7 @@ process_arguments (int argc, char **argv) | |||
192 | return ERROR; | 192 | return ERROR; |
193 | 193 | ||
194 | while (1) { | 194 | while (1) { |
195 | c = getopt_long (argc, argv, "hvVSP:p:u:d:H:s:q:w:c:", longopts, &option); | 195 | c = getopt_long (argc, argv, "hvVP:p:u:d:H:s:q:w:c:", longopts, &option); |
196 | 196 | ||
197 | if (c == -1 || c == EOF) | 197 | if (c == -1 || c == EOF) |
198 | break; | 198 | break; |
diff --git a/plugins/check_nt.c b/plugins/check_nt.c index ef1b530d..7d20b000 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c | |||
@@ -745,6 +745,6 @@ void print_help(void) | |||
745 | void print_usage(void) | 745 | void print_usage(void) |
746 | { | 746 | { |
747 | printf (_("Usage:")); | 747 | printf (_("Usage:")); |
748 | printf ("%s -H host -v variable [-p port] [-w warning] [-c critical]",progname); | 748 | printf ("%s -H host -v variable [-p port] [-w warning] [-c critical]\n",progname); |
749 | printf ("[-l params] [-d SHOWALL] [-t timeout]\n"); | 749 | printf ("[-l params] [-d SHOWALL] [-t timeout]\n"); |
750 | } | 750 | } |