summaryrefslogtreecommitdiffstats
path: root/plugins/check_disk.c
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-06-30 17:02:19 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-06-30 17:02:19 (GMT)
commit909d85043409e9a82f14510d319979490063f2a7 (patch)
tree96e17472eec57e488df2cd09f910ce1f3864f883 /plugins/check_disk.c
parent84a71d088a6eb74d5e9d31fc6769e79b9e42f5b0 (diff)
downloadmonitoring-plugins-909d85043409e9a82f14510d319979490063f2a7.tar.gz
Fixed support for "check_disk warn crit [path]" with thresholds at used levels
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@572 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r--plugins/check_disk.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 01b316b..8bdf64b 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -426,7 +426,6 @@ process_arguments (int argc, char **argv)
426 *dptail = se; 426 *dptail = se;
427 dptail = &se->name_next; 427 dptail = &se->name_next;
428 break; 428 break;
429 break;
430 case 'X': /* exclude file system type */ 429 case 'X': /* exclude file system type */
431 se = (struct name_list *) malloc (sizeof (struct name_list)); 430 se = (struct name_list *) malloc (sizeof (struct name_list));
432 se->name = strdup (optarg); 431 se->name = strdup (optarg);
@@ -464,6 +463,7 @@ process_arguments (int argc, char **argv)
464 } 463 }
465 } 464 }
466 465
466 /* Support for "check_disk warn crit [fs]" with thresholds at used level */
467 c = optind; 467 c = optind;
468 if (w_dfp == -1 && argc > c && is_intnonneg (argv[c])) 468 if (w_dfp == -1 && argc > c && is_intnonneg (argv[c]))
469 w_dfp = (100.0 - atof (argv[c++])); 469 w_dfp = (100.0 - atof (argv[c++]));
@@ -471,8 +471,16 @@ process_arguments (int argc, char **argv)
471 if (c_dfp == -1 && argc > c && is_intnonneg (argv[c])) 471 if (c_dfp == -1 && argc > c && is_intnonneg (argv[c]))
472 c_dfp = (100.0 - atof (argv[c++])); 472 c_dfp = (100.0 - atof (argv[c++]));
473 473
474 if (argc > c && strlen (path) == 0) 474 if (argc > c && strlen (path) == 0) {
475 path = argv[c++]; 475 se = (struct name_list *) malloc (sizeof (struct name_list));
476 se->name = strdup (argv[c++]);
477 se->name_next = NULL;
478 se->w_df = w_df;
479 se->c_df = c_df;
480 se->w_dfp = w_dfp;
481 se->c_dfp = c_dfp;
482 *pathtail = se;
483 }
476 484
477 if (path_select_list) { 485 if (path_select_list) {
478 temp_list = path_select_list; 486 temp_list = path_select_list;