Browse Source

Implement -e option for clish binary. It's stop on error flag. By default - no stop on error.

git-svn-id: https://klish.googlecode.com/svn/trunk@255 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 14 years ago
parent
commit
96d51f14c6
1 changed files with 6 additions and 1 deletions
  1. 6 1
      bin/clish.cpp

+ 6 - 1
bin/clish.cpp

@@ -43,12 +43,13 @@ int main(int argc, char **argv)
 	bool_t lockless = BOOL_FALSE;
 	bool_t stop_on_error = BOOL_FALSE;
 
-	static const char *shortopts = "hvs:l";
+	static const char *shortopts = "hvs:le";
 /*	static const struct option longopts[] = {
 		{"help",	0, NULL, 'h'},
 		{"version",	0, NULL, 'v'},
 		{"socket",	1, NULL, 's'},
 		{"lockless",	0, NULL, 'l'},
+		{"stop-on-error", 0, NULL, 'e'},
 		{NULL,		0, NULL, 0}
 	};
 */
@@ -67,6 +68,9 @@ int main(int argc, char **argv)
 		case 'l':
 			lockless = BOOL_TRUE;
 			break;
+		case 'e':
+			stop_on_error = BOOL_TRUE;
+			break;
 		case 'h':
 			help(0, argv[0]);
 			exit(0);
@@ -148,6 +152,7 @@ static void help(int status, const char *argv0)
 		printf("\t-s <path>, --socket=<path>\tSpecify listen socket "
 			"of the konfd daemon.\n");
 		printf("\t-l, --lockless\tDon't use locking mechanism.\n");
+		printf("\t-e, --stop-on-error\tStop programm execution on error.\n");
 	}
 }