pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30969 )
Change subject: layer23: mobile: Several fixes and improvements in show_ms_cmd ......................................................................
layer23: mobile: Several fixes and improvements in show_ms_cmd
Fix missing VTY param description. Fix wrong indentation. Fix unneeded else after early return.
Change-Id: I4a55328e71ec16355974c20275c0e525077252e1 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 8 insertions(+), 7 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, approved
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 943ebd9..6fc7f5b 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -242,7 +242,8 @@
DEFUN(show_ms, show_ms_cmd, "show ms [MS_NAME]", - SHOW_STR "Display available MS entities\n") + SHOW_STR "Display available MS entities\n" + "Display specific MS with given name") { struct osmocom_ms *ms;
@@ -254,13 +255,13 @@ } } vty_out(vty, "MS name '%s' does not exits.%s", argv[0], - VTY_NEWLINE); + VTY_NEWLINE); return CMD_WARNING; - } else { - llist_for_each_entry(ms, &ms_list, entity) { - gsm_ms_dump(ms, vty); - vty_out(vty, "%s", VTY_NEWLINE); - } + } + + llist_for_each_entry(ms, &ms_list, entity) { + gsm_ms_dump(ms, vty); + vty_out(vty, "%s", VTY_NEWLINE); }
return CMD_SUCCESS;