summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;