summaryrefslogtreecommitdiffstats
path: root/plugins/check_disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r--plugins/check_disk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 0d84ecd..24de2d4 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -550,6 +550,10 @@ process_arguments (int argc, char **argv)
550 550
551 /* See comments for 'c' */ 551 /* See comments for 'c' */
552 case 'w': /* warning threshold */ 552 case 'w': /* warning threshold */
553 if (!is_percentage_expression(optarg) && !is_numeric(optarg)) {
554 die(STATE_UNKNOWN, "Argument for --warning invalid or missing: %s\n", optarg);
555 }
556
553 if (strstr(optarg, "%")) { 557 if (strstr(optarg, "%")) {
554 if (*optarg == '@') { 558 if (*optarg == '@') {
555 warn_freespace_percent = optarg; 559 warn_freespace_percent = optarg;
@@ -571,6 +575,10 @@ process_arguments (int argc, char **argv)
571 force @ at the beginning of the range, so that it is backwards compatible 575 force @ at the beginning of the range, so that it is backwards compatible
572 */ 576 */
573 case 'c': /* critical threshold */ 577 case 'c': /* critical threshold */
578 if (!is_percentage_expression(optarg) && !is_numeric(optarg)) {
579 die(STATE_UNKNOWN, "Argument for --critical invalid or missing: %s\n", optarg);
580 }
581
574 if (strstr(optarg, "%")) { 582 if (strstr(optarg, "%")) {
575 if (*optarg == '@') { 583 if (*optarg == '@') {
576 crit_freespace_percent = optarg; 584 crit_freespace_percent = optarg;