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
This commit is contained in:
Pau Espin 2023-01-13 13:28:26 +01:00
parent ea03422cd8
commit 9010a6be52
1 changed files with 8 additions and 7 deletions

View File

@ -242,7 +242,8 @@ static void gsm_ms_dump(struct osmocom_ms *ms, struct vty *vty)
DEFUN(show_ms, show_ms_cmd, "show ms [MS_NAME]", 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; struct osmocom_ms *ms;
@ -254,13 +255,13 @@ DEFUN(show_ms, show_ms_cmd, "show ms [MS_NAME]",
} }
} }
vty_out(vty, "MS name '%s' does not exits.%s", argv[0], vty_out(vty, "MS name '%s' does not exits.%s", argv[0],
VTY_NEWLINE); VTY_NEWLINE);
return CMD_WARNING; return CMD_WARNING;
} else { }
llist_for_each_entry(ms, &ms_list, entity) {
gsm_ms_dump(ms, vty); llist_for_each_entry(ms, &ms_list, entity) {
vty_out(vty, "%s", VTY_NEWLINE); gsm_ms_dump(ms, vty);
} vty_out(vty, "%s", VTY_NEWLINE);
} }
return CMD_SUCCESS; return CMD_SUCCESS;