summaryrefslogtreecommitdiff
path: root/src/cli_shell_api.cpp
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2011-04-13 15:32:55 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2011-04-13 15:32:55 -0700
commitbea24e830d53460703c9bdefd54476080b011450 (patch)
treea940758dd93c205670d54898ed16a09e33a61899 /src/cli_shell_api.cpp
parent7659d4706b5c167f826d7ab4ecb2ef4a7eb74d7a (diff)
downloadvyatta-cfg-bea24e830d53460703c9bdefd54476080b011450.tar.gz
vyatta-cfg-bea24e830d53460703c9bdefd54476080b011450.zip
fix for bug 6996
* add "ignore-edit" option for config output. * ignore "edit level" when saving config file.
Diffstat (limited to 'src/cli_shell_api.cpp')
-rw-r--r--src/cli_shell_api.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cli_shell_api.cpp b/src/cli_shell_api.cpp
index 9678e5c..363a38f 100644
--- a/src/cli_shell_api.cpp
+++ b/src/cli_shell_api.cpp
@@ -60,6 +60,7 @@ int op_show_hide_secrets = 0;
int op_show_working_only = 0;
int op_show_context_diff = 0;
int op_show_commands = 0;
+int op_show_ignore_edit = 0;
char *op_show_cfg1 = NULL;
char *op_show_cfg2 = NULL;
@@ -429,6 +430,8 @@ showCfg(Cstore& cstore, const Cpath& args)
* show "context diff" between two configs
* --show-commands
* show output in "commands"
+ * --show-ignore-edit
+ * don't use the edit level in environment
*
* note that when neither cfg1 nor cfg2 specifies a config file, the "args"
* argument specifies the root path for the show output, and the "edit level"
@@ -456,7 +459,7 @@ showConfig(Cstore& cstore, const Cpath& args)
cnode::showConfig(cfg1, cfg2, args, op_show_show_defaults,
op_show_hide_secrets, op_show_context_diff,
- op_show_commands);
+ op_show_commands, op_show_ignore_edit);
}
static void
@@ -535,6 +538,7 @@ struct option options[] = {
{"show-working-only", no_argument, &op_show_working_only, 1},
{"show-context-diff", no_argument, &op_show_context_diff, 1},
{"show-commands", no_argument, &op_show_commands, 1},
+ {"show-ignore-edit", no_argument, &op_show_ignore_edit, 1},
{"show-cfg1", required_argument, NULL, SHOW_CFG1},
{"show-cfg2", required_argument, NULL, SHOW_CFG2},
{NULL, 0, NULL, 0}