aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-01-19 20:58:33 +0100
committerlaforge <laforge@osmocom.org>2021-01-20 14:59:03 +0000
commit1262c4f18ebea2dddc2867be901d26aa60da6e4a (patch)
treeae3bc1b74cee71445c331516f411968aea5fd53b /src/gb/gprs_ns2_vty.c
parentcec4bbed73829d0eafcc34b2d8a8cac265b0d6bd (diff)
ns2: Properly indent VTY output
If multiple objects are printed in the VTY, only the first line of each object should be on the first character of the line, all others should be indented. With this patch the "snow ns entities" output becomes much more readable: OsmoGbProxy> show ns entities NSEI 00102: UDP, DEAD FSM Instance Name: 'GPRS-NS2-SNS-BSS(NSE00102-SNS)[0x6120000018a0]', ID: 'NSE00102-SNS' Log-Level: 'DEBUG', State: 'SIZE' Timer: 1 Maximum number of remote NS-VCs: 8, IPv4 Endpoints: 4, IPv6 Endpoints: 0 NSVCI none: UNCONFIGURED DYNAMIC data_weight=1 sig_weight=1 udp)[127.0.0.1]:23000<>[127.0.0.11]:8888 NSEI 00101: UDP, DEAD FSM Instance Name: 'GPRS-NS2-SNS-BSS(NSE00101-SNS)[0x6120000015a0]', ID: 'NSE00101-SNS' Log-Level: 'DEBUG', State: 'SIZE' Timer: 1 Maximum number of remote NS-VCs: 8, IPv4 Endpoints: 4, IPv6 Endpoints: 0 NSVCI none: UNCONFIGURED DYNAMIC data_weight=1 sig_weight=1 udp)[127.0.0.1]:23000<>[127.0.0.10]:7777 Change-Id: Id1b4c80a6caef410076a68b4301adaa01ba7e57a
Diffstat (limited to 'src/gb/gprs_ns2_vty.c')
-rw-r--r--src/gb/gprs_ns2_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 065f3ad8..36a7f78f 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -298,7 +298,7 @@ static void dump_nse(struct vty *vty, const struct gprs_ns2_nse *nse, bool stats
vty_out(vty, "NSEI %05u: %s, %s%s", nse->nsei, gprs_ns2_lltype_str(nse->ll),
nse->alive ? "ALIVE" : "DEAD", VTY_NEWLINE);
- gprs_ns2_sns_dump_vty(vty, nse, stats);
+ gprs_ns2_sns_dump_vty(vty, " ", nse, stats);
llist_for_each_entry(nsvc, &nse->nsvc, list) {
if (persistent_only) {
if (nsvc->persistent)