summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Nierlein <sven@consol.de>2023-11-27 10:35:29 (GMT)
committerSven Nierlein <sven@consol.de>2023-11-27 12:04:10 (GMT)
commitf59c51601122ceac7ef4571d1993a34728e76813 (patch)
tree0b763ed405fb8a8567e2e9c53114a5ae63c45610
parentdf690d695763ebbfebb60e22656ddea6cecb6690 (diff)
downloadmonitoring-plugins-f59c51601122ceac7ef4571d1993a34728e76813.tar.gz
check_disk: add -n short option for --ignore-missing
Signed-off-by: Sven Nierlein <sven@consol.de>
-rw-r--r--plugins/check_disk.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index a4180ca..e9a9ddd 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -112,8 +112,7 @@ enum
112{ 112{
113 SYNC_OPTION = CHAR_MAX + 1, 113 SYNC_OPTION = CHAR_MAX + 1,
114 NO_SYNC_OPTION, 114 NO_SYNC_OPTION,
115 BLOCK_SIZE_OPTION, 115 BLOCK_SIZE_OPTION
116 IGNORE_MISSING
117}; 116};
118 117
119#ifdef _AIX 118#ifdef _AIX
@@ -524,7 +523,7 @@ process_arguments (int argc, char **argv)
524 {"ignore-ereg-partition", required_argument, 0, 'i'}, 523 {"ignore-ereg-partition", required_argument, 0, 'i'},
525 {"ignore-eregi-path", required_argument, 0, 'I'}, 524 {"ignore-eregi-path", required_argument, 0, 'I'},
526 {"ignore-eregi-partition", required_argument, 0, 'I'}, 525 {"ignore-eregi-partition", required_argument, 0, 'I'},
527 {"ignore-missing", no_argument, 0, IGNORE_MISSING}, 526 {"ignore-missing", no_argument, 0, 'n'},
528 {"local", no_argument, 0, 'l'}, 527 {"local", no_argument, 0, 'l'},
529 {"stat-remote-fs", no_argument, 0, 'L'}, 528 {"stat-remote-fs", no_argument, 0, 'L'},
530 {"iperfdata", no_argument, 0, 'P'}, 529 {"iperfdata", no_argument, 0, 'P'},
@@ -550,7 +549,7 @@ process_arguments (int argc, char **argv)
550 strcpy (argv[c], "-t"); 549 strcpy (argv[c], "-t");
551 550
552 while (1) { 551 while (1) {
553 c = getopt_long (argc, argv, "+?VqhvefCt:c:w:K:W:u:p:x:X:N:mklLPg:R:r:i:I:MEA", longopts, &option); 552 c = getopt_long (argc, argv, "+?VqhvefCt:c:w:K:W:u:p:x:X:N:mklLPg:R:r:i:I:MEAn", longopts, &option);
554 553
555 if (c == -1 || c == EOF) 554 if (c == -1 || c == EOF)
556 break; 555 break;
@@ -792,7 +791,7 @@ process_arguments (int argc, char **argv)
792 cflags = default_cflags; 791 cflags = default_cflags;
793 break; 792 break;
794 793
795 case IGNORE_MISSING: 794 case 'n':
796 ignore_missing = true; 795 ignore_missing = true;
797 break; 796 break;
798 case 'A': 797 case 'A':
@@ -1004,7 +1003,7 @@ print_help (void)
1004 printf (" %s\n", _("Regular expression to ignore selected path/partition (case insensitive) (may be repeated)")); 1003 printf (" %s\n", _("Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"));
1005 printf (" %s\n", "-i, --ignore-ereg-path=PATH, --ignore-ereg-partition=PARTITION"); 1004 printf (" %s\n", "-i, --ignore-ereg-path=PATH, --ignore-ereg-partition=PARTITION");
1006 printf (" %s\n", _("Regular expression to ignore selected path or partition (may be repeated)")); 1005 printf (" %s\n", _("Regular expression to ignore selected path or partition (may be repeated)"));
1007 printf (" %s\n", "--ignore-missing"); 1006 printf (" %s\n", "-n, --ignore-missing");
1008 printf (" %s\n", _("Return OK if no filesystem matches, filesystem does not exist or is inaccessible.")); 1007 printf (" %s\n", _("Return OK if no filesystem matches, filesystem does not exist or is inaccessible."));
1009 printf (" %s\n", _("(Provide this option before -p / -r / --ereg-path if used)")); 1008 printf (" %s\n", _("(Provide this option before -p / -r / --ereg-path if used)"));
1010 printf (UT_PLUG_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); 1009 printf (UT_PLUG_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);