[Nagiosplug-checkins] nagiosplug/plugins check_ide_smart.c,1.4,1.5

Benoit Mortier opensides at users.sourceforge.net
Sun Jan 2 17:38:21 CET 2005


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25564/plugins

Modified Files:
	check_ide_smart.c 
Log Message:

more fixes for #1094326



Index: check_ide_smart.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ide_smart.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- check_ide_smart.c	2 Jan 2005 14:00:27 -0000	1.4
+++ check_ide_smart.c	3 Jan 2005 01:37:10 -0000	1.5
@@ -45,6 +45,9 @@
 #include "common.h"
 #include "utils.h"
 
+void print_help (void);
+void print_usage (void);
+
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
@@ -145,6 +148,8 @@
 		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 @@
 		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 @@
 
 
 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 @@
 
 
 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 @@
     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 <device>] [-i <immediate>] [-q quiet] [-1 <auto-on>]\n\
+                        [-O <auto-off>] [-n <nagios>]\n", progname);
 }





More information about the Commits mailing list