VTY: improve VTY prompt and make sure exit/end works everywhere
Some nodes below 'config' didn't have ournode_exit / ournode_end,
and thus were not able to properly perform this function. exit should
always only go back one level, while end drops us back to ENABLE_NODE.
The prompt now represents the nesting level, and there's one consistent
space after the final prompt character (typically #).
diff --git a/openbsc/src/gprs/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c
index 574f45f..bfa1f3b 100644
--- a/openbsc/src/gprs/gb_proxy_vty.c
+++ b/openbsc/src/gprs/gb_proxy_vty.c
@@ -40,7 +40,7 @@
*/
static struct cmd_node gbproxy_node = {
GBPROXY_NODE,
- "%s(gbproxy)#",
+ "%s(config-gbproxy)# ",
1,
};
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index f4a8083..1fc0b41 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -106,7 +106,7 @@
static struct cmd_node sgsn_node = {
SGSN_NODE,
- "%s(sgsn)#",
+ "%s(config-sgsn)# ",
1,
};