summaryrefslogtreecommitdiffstats
path: root/plugins/check_swap.c
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-05-07 10:02:42 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-05-07 10:02:42 (GMT)
commit44f8455b2cf248c6f50c35bfc3510d2946084c5b (patch)
tree26b696c5d61872f1d41466be9fcc650c22d75aeb /plugins/check_swap.c
parent4d157889e3018119e07bdcc7f48afde1422f7396 (diff)
downloadmonitoring-plugins-44f8455b2cf248c6f50c35bfc3510d2946084c5b.tar.gz
Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_swap.c')
-rw-r--r--plugins/check_swap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 1c627ac..04cc1ae 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -107,6 +107,9 @@ main (int argc, char **argv)
107 107
108 status = strdup (""); 108 status = strdup ("");
109 109
110 /* Parse extra opts if any */
111 argv=np_extra_opts (&argc, argv, progname);
112
110 if (process_arguments (argc, argv) == ERROR) 113 if (process_arguments (argc, argv) == ERROR)
111 usage4 (_("Could not parse arguments")); 114 usage4 (_("Could not parse arguments"));
112 115
@@ -530,6 +533,7 @@ print_help (void)
530 print_usage (); 533 print_usage ();
531 534
532 printf (_(UT_HELP_VRSN)); 535 printf (_(UT_HELP_VRSN));
536 printf (_(UT_EXTRA_OPTS));
533 537
534 printf (" %s\n", "-w, --warning=INTEGER"); 538 printf (" %s\n", "-w, --warning=INTEGER");
535 printf (" %s\n", _("Exit with WARNING status if less than INTEGER bytes of swap space are free")); 539 printf (" %s\n", _("Exit with WARNING status if less than INTEGER bytes of swap space are free"));
@@ -546,6 +550,11 @@ print_help (void)
546 printf ("\n"); 550 printf ("\n");
547 printf ("%s\n", _("Notes:")); 551 printf ("%s\n", _("Notes:"));
548 printf (" %s\n", _("On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.")); 552 printf (" %s\n", _("On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s."));
553#ifdef NP_EXTRA_OPTS
554 printf ("\n");
555 printf (_(UT_EXTRA_OPTS_NOTES));
556#endif
557
549 558
550 printf (_(UT_SUPPORT)); 559 printf (_(UT_SUPPORT));
551} 560}