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/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c
index 016ad14..314faa8 100644
--- a/openbsc/src/libmgcp/mgcp_vty.c
+++ b/openbsc/src/libmgcp/mgcp_vty.c
@@ -51,13 +51,13 @@
*/
struct cmd_node mgcp_node = {
MGCP_NODE,
- "%s(mgcp)#",
+ "%s(config-mgcp)# ",
1,
};
struct cmd_node trunk_node = {
TRUNK_NODE,
- "%s(trunk)#",
+ "%s(config-mgcp-trunk)# ",
1,
};