From 3fc45dccc5fca03c7b74e0c06f9a95da08cc1fec Mon Sep 17 00:00:00 2001 From: Benoit Mortier Date: Mon, 3 Jan 2005 01:37:10 +0000 Subject: more fixes for #1094326 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1077 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c index 0b7b230..6487d08 100644 --- a/plugins/check_ide_smart.c +++ b/plugins/check_ide_smart.c @@ -45,6 +45,9 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; #include "common.h" #include "utils.h" +void print_help (void); +void print_usage (void); + #include #include #include @@ -145,6 +148,8 @@ enum SmartCommand SMART_CMD_AUTO_OFFLINE }; +void print_values (values_t * p, thresholds_t * t); +int smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error); int main (int argc, char *argv[]) @@ -249,7 +254,7 @@ main (int argc, char *argv[]) case 4: smart_read_values (fd, &values); smart_read_thresholds (fd, &thresholds); - retval = net_saint (&values, &thresholds); + retval = nagios (&values, &thresholds); break; default: smart_read_values (fd, &values); @@ -324,7 +329,7 @@ values_not_passed (values_t * p, thresholds_t * t) int -net_saint (values_t * p, thresholds_t * t) +nagios (values_t * p, thresholds_t * t) { value_t * value = p->values; threshold_t * threshold = t->thresholds; @@ -397,7 +402,7 @@ print_value (value_t * p, threshold_t * t) void -print_values (values_t * p, thresholds_t * t) +print_values (values_t * p, thresholds_t * t) { value_t * value = p->values; threshold_t * threshold = t->thresholds; @@ -506,13 +511,15 @@ Usage: %s [DEVICE] [OPTION]\n\ Turn on automatic offline tests\n\ -0, --auto-off\n\ Turn off automatic offline tests\n\ - -n, --net-saint\n\ - Output suitable for Net Saint\n", progname); + -n, --nagios\n\ + Output suitable for Nagios\n", progname); } void print_usage (void) { - printf ("Usage: %s \n", progname); + printf ("\ +Usage: %s [-d ] [-i ] [-q quiet] [-1 ]\n\ + [-O ] [-n ]\n", progname); } -- cgit v0.10-9-g596f