From 3cad6558b030bc3b0ebb662ec7d0346ab9a32cc2 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Sun, 26 Feb 2012 22:16:59 +0530 Subject: cli: Add 'exit' command. Based on request at: http://community.gluster.org/i/make-cli-understand-command-exit/ Change-Id: I9116236a8c2f7767c88672b8d3d6565906bfc61f BUG: 797551 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.com/2815 Tested-by: Gluster Build System Reviewed-by: Raghavendra Bhat Reviewed-by: Amar Tumballi --- cli/src/cli-cmd-misc.c | 4 ++++ cli/src/cli-cmd.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'cli') diff --git a/cli/src/cli-cmd-misc.c b/cli/src/cli-cmd-misc.c index 40f419cde04..66d755fc2dc 100644 --- a/cli/src/cli-cmd-misc.c +++ b/cli/src/cli-cmd-misc.c @@ -80,6 +80,10 @@ struct cli_cmd cli_misc_cmds[] = { cli_cmd_display_help, "display command options"}, + { "exit", + cli_cmd_quit_cbk, + "exit"}, + { NULL, NULL, NULL } }; diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c index a7adfa981f1..f2b434ac7a4 100644 --- a/cli/src/cli-cmd.c +++ b/cli/src/cli-cmd.c @@ -60,6 +60,9 @@ cli_cmd_needs_connection (struct cli_cmd_word *word) if (!strcasecmp ("getwd", word->word)) return 1; + if (!strcasecmp ("exit", word->word)) + return 0; + return CLI_DEFAULT_CONN_TIMEOUT; } -- cgit