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/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index d7cdee6..b91304d 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -97,25 +97,25 @@
struct cmd_node net_node = {
GSMNET_NODE,
- "%s(network)#",
+ "%s(config-net)# ",
1,
};
struct cmd_node bts_node = {
BTS_NODE,
- "%s(bts)#",
+ "%s(config-net-bts)# ",
1,
};
struct cmd_node trx_node = {
TRX_NODE,
- "%s(trx)#",
+ "%s(config-net-bts-trx)# ",
1,
};
struct cmd_node ts_node = {
TS_NODE,
- "%s(ts)#",
+ "%s(config-net-bts-trx-ts)# ",
1,
};