diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-06-30 17:02:19 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-06-30 17:02:19 +0000 |
commit | 909d85043409e9a82f14510d319979490063f2a7 (patch) | |
tree | 96e17472eec57e488df2cd09f910ce1f3864f883 | |
parent | 84a71d088a6eb74d5e9d31fc6769e79b9e42f5b0 (diff) | |
download | monitoring-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
-rw-r--r-- | plugins/check_disk.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 01b316bd..8bdf64b8 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -426,7 +426,6 @@ process_arguments (int argc, char **argv) *dptail = se; dptail = &se->name_next; break; - break; case 'X': /* exclude file system type */ se = (struct name_list *) malloc (sizeof (struct name_list)); se->name = strdup (optarg); @@ -464,6 +463,7 @@ process_arguments (int argc, char **argv) } } + /* Support for "check_disk warn crit [fs]" with thresholds at used level */ c = optind; if (w_dfp == -1 && argc > c && is_intnonneg (argv[c])) w_dfp = (100.0 - atof (argv[c++])); @@ -471,8 +471,16 @@ process_arguments (int argc, char **argv) if (c_dfp == -1 && argc > c && is_intnonneg (argv[c])) c_dfp = (100.0 - atof (argv[c++])); - if (argc > c && strlen (path) == 0) - path = argv[c++]; + if (argc > c && strlen (path) == 0) { + se = (struct name_list *) malloc (sizeof (struct name_list)); + se->name = strdup (argv[c++]); + se->name_next = NULL; + se->w_df = w_df; + se->c_df = c_df; + se->w_dfp = w_dfp; + se->c_dfp = c_dfp; + *pathtail = se; + } if (path_select_list) { temp_list = path_select_list; |