*** plugins/check_disk.c.orig Thu Jul 10 11:03:55 2008 --- plugins/check_disk.c Wed Jan 14 11:49:37 2009 *************** *** 155,160 **** --- 155,161 ---- int path_selected = FALSE; char *group = NULL; struct stat *stat_buf; + int no_match_ok = 0; int *************** *** 493,498 **** --- 494,500 ---- {"ignore-ereg-partition", required_argument, 0, 'i'}, {"ignore-eregi-path", required_argument, 0, 'I'}, {"ignore-eregi-partition", required_argument, 0, 'I'}, + {"no-match-ok", no_argument, 0, 'n'}, {"local", no_argument, 0, 'l'}, {"stat-remote-fs", no_argument, 0, 'L'}, {"mountpoint", no_argument, 0, 'M'}, *************** *** 517,523 **** strcpy (argv[c], "-t"); while (1) { ! c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklLg:R:r:i:I:MEA", longopts, &option); if (c == -1 || c == EOF) break; --- 519,525 ---- strcpy (argv[c], "-t"); while (1) { ! c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklLg:R:r:i:I:MEAn", longopts, &option); if (c == -1 || c == EOF) break; *************** *** 669,674 **** --- 671,679 ---- die (STATE_UNKNOWN, "DISK %s: %s", _("UNKNOWN"), _("Must set group value before selecting pathes \n")); group = optarg; break; + case 'n': /* Don't complain if a regular expression doesn't match anything */ + no_match_ok = 1; + break; case 'I': cflags |= REG_ICASE; case 'i': *************** *** 741,747 **** } } ! if (!fnd) die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), _("Regular expression did not match any path or disk"), optarg); --- 746,752 ---- } } ! if (!fnd && !no_match_ok) die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), _("Regular expression did not match any path or disk"), optarg);