summaryrefslogtreecommitdiffstats
path: root/plugins/check_cluster.c
diff options
context:
space:
mode:
authorMatthias Eble <psychotrahe@users.sourceforge.net>2007-06-20 09:01:07 (GMT)
committerMatthias Eble <psychotrahe@users.sourceforge.net>2007-06-20 09:01:07 (GMT)
commita82c2b4c3e9eb4fddc26f5d7840bfef0fbfbc141 (patch)
treed568c3c5d35024b17b065d452f5b8f4a17cb3e82 /plugins/check_cluster.c
parent1aa01940861cae855a9b7cd2c7ccdebc116b309a (diff)
downloadmonitoring-plugins-a82c2b4c3e9eb4fddc26f5d7840bfef0fbfbc141.tar.gz
added -V/--version to check_cluster
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1745 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_cluster.c')
-rw-r--r--plugins/check_cluster.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/check_cluster.c b/plugins/check_cluster.c
index 5d52d42..703fff9 100644
--- a/plugins/check_cluster.c
+++ b/plugins/check_cluster.c
@@ -151,6 +151,7 @@ int process_arguments(int argc, char **argv){
151 {"host", no_argument, 0,'h'}, 151 {"host", no_argument, 0,'h'},
152 {"service", no_argument, 0,'s'}, 152 {"service", no_argument, 0,'s'},
153 {"verbose", no_argument, 0,'v'}, 153 {"verbose", no_argument, 0,'v'},
154 {"version", no_argument, 0,'V'},
154 {"help", no_argument, 0,'H'}, 155 {"help", no_argument, 0,'H'},
155 {0,0,0,0} 156 {0,0,0,0}
156 }; 157 };
@@ -161,7 +162,7 @@ int process_arguments(int argc, char **argv){
161 162
162 while(1){ 163 while(1){
163 164
164 c=getopt_long(argc,argv,"hHsvw:c:d:l:",longopts,&option); 165 c=getopt_long(argc,argv,"hHsvVw:c:d:l:",longopts,&option);
165 166
166 if(c==-1 || c==EOF || c==1) 167 if(c==-1 || c==EOF || c==1)
167 break; 168 break;
@@ -200,6 +201,11 @@ int process_arguments(int argc, char **argv){
200 verbose++; 201 verbose++;
201 break; 202 break;
202 203
204 case 'V': /* version */
205 print_revision (progname, revision);
206 exit (STATE_OK);
207 break;
208
203 case 'H': /* help */ 209 case 'H': /* help */
204 print_help(); 210 print_help();
205 exit(STATE_UNKNOWN); 211 exit(STATE_UNKNOWN);