summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rwxr-xr-xetc/bash_completion.d/vyatta-cfg10
-rw-r--r--src/cnode/cnode-algorithm.cpp27
3 files changed, 6 insertions, 33 deletions
diff --git a/Makefile.am b/Makefile.am
index 17567f9..41baca7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -120,8 +120,6 @@ install-exec-hook:
cd $(DESTDIR)$(sbindir); \
$(LN_S) my_cli_bin my_set; \
$(LN_S) my_cli_bin my_delete; \
- $(LN_S) my_cli_bin my_activate; \
- $(LN_S) my_cli_bin my_deactivate; \
$(LN_S) my_cli_bin my_rename; \
$(LN_S) my_cli_bin my_copy; \
$(LN_S) my_cli_bin my_comment; \
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg
index 32a5283..3be5a78 100755
--- a/etc/bash_completion.d/vyatta-cfg
+++ b/etc/bash_completion.d/vyatta-cfg
@@ -702,14 +702,12 @@ vyatta_config_complete ()
fi
if (( ${#COMP_WORDS[@]} < 2 )); then
- _get_help_text_items=( "activate" \
- "confirm" \
+ _get_help_text_items=( "confirm" \
"comment" \
"commit" \
"commit-confirm" \
"compare" \
"copy" \
- "deactivate" \
"delete" \
"discard" \
"edit" \
@@ -724,14 +722,12 @@ vyatta_config_complete ()
"set" \
"show" )
_get_help_text_helps=( \
- "Activate this element" \
"Confirm prior commit" \
"Add comment to this configuration element" \
"Commit the current set of changes" \
"Commit the current set of changes with confirm" \
"Compare configuration revisions" \
"Copy a configuration element" \
- "Deactivate this element" \
"Delete a configuration element" \
"Discard uncommitted changes" \
"Edit a sub-element" \
@@ -861,8 +857,6 @@ builtin set -o ignoreeof 1
reset_edit_level
alias set=/opt/vyatta/sbin/my_set
alias delete=/opt/vyatta/sbin/my_delete
-alias activate=/opt/vyatta/sbin/my_activate
-alias deactivate=/opt/vyatta/sbin/my_deactivate
alias rename=/opt/vyatta/sbin/my_rename
alias copy=/opt/vyatta/sbin/my_copy
alias comment=/opt/vyatta/sbin/my_comment
@@ -880,8 +874,6 @@ if ! bind -p |grep -q '\\C-x\\C-o'; then
fi
complete -F vyatta_config_complete ''
-complete -F vyatta_config_complete activate
-complete -F vyatta_config_complete deactivate
complete -F vyatta_config_complete set
complete -F vyatta_config_complete delete
complete -F vyatta_config_complete show
diff --git a/src/cnode/cnode-algorithm.cpp b/src/cnode/cnode-algorithm.cpp
index fa3912c..4480352 100644
--- a/src/cnode/cnode-algorithm.cpp
+++ b/src/cnode/cnode-algorithm.cpp
@@ -33,11 +33,6 @@ static const string PFX_DIFF_UPD = ">"; // changed
static const string PFX_DIFF_NONE = " ";
static const string PFX_DIFF_NULL = "";
-static const string PFX_DEACT_D = "!"; // deactivated
-static const string PFX_DEACT_DP = "D"; // deactivate pending
-static const string PFX_DEACT_AP = "A"; // activate pending
-static const string PFX_DEACT_NONE = " ";
-
////// static (internal) functions
static void
@@ -78,23 +73,11 @@ static void
_diff_print_indent(CfgNode *cfg1, CfgNode *cfg2, int level,
const char *pfx_diff)
{
- const char *pfx_deact = PFX_DEACT_NONE.c_str();
- bool de1 = (cfg1 ? cfg1->isDeactivated() : false);
- bool de2 = (cfg2 ? cfg2->isDeactivated() : false);
- if (de1) {
- if (de2) {
- pfx_deact = PFX_DEACT_D.c_str();
- } else {
- pfx_deact = PFX_DEACT_AP.c_str();
- }
- } else {
- if (de2) {
- pfx_deact = PFX_DEACT_DP.c_str();
- }
- // 4th case handled by default
- }
-
- printf("%s %s", pfx_deact, pfx_diff);
+ /* note: activate/deactivate state output was handled here. pending
+ * redesign, the output notation will be changed to "per-subtree"
+ * marking, so the output will be handled with the rest of the node.
+ */
+ printf("%s", pfx_diff);
for (int i = 0; i < level; i++) {
printf(" ");
}