diff options
| -rw-r--r-- | lib/json.c | 2 | ||||
| -rw-r--r-- | vtysh/vtysh.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/json.c b/lib/json.c index 186efc9f48..5b7c3e9ffa 100644 --- a/lib/json.c +++ b/lib/json.c @@ -34,7 +34,7 @@ use_json (const int argc, struct cmd_token *argv[]) if (argc == 0) return 0; - if (argv[argc-1]->arg && strcmp(argv[argc-1]->arg, "json") == 0) + if (argv[argc-1]->arg && strmatch (argv[argc-1]->text, "json")) return 1; return 0; diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 76c7702fa0..91f0b3bea6 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -2061,7 +2061,7 @@ DEFUN (vtysh_show_work_queues, { unsigned int i; int ret = CMD_SUCCESS; - char line[] = "show work-queues\n"; + char line[] = "do show work-queues\n"; for (i = 0; i < array_size(vtysh_client); i++) if ( vtysh_client[i].fd >= 0 ) @@ -2171,7 +2171,7 @@ DEFUN (vtysh_show_logging, { unsigned int i; int ret = CMD_SUCCESS; - char line[] = "show logging\n"; + char line[] = "do show logging\n"; for (i = 0; i < array_size(vtysh_client); i++) if ( vtysh_client[i].fd >= 0 ) @@ -2487,7 +2487,7 @@ DEFUN (vtysh_write_terminal, "For the pim daemon\n") { u_int i; - char line[] = "write terminal\n"; + char line[] = "do write terminal\n"; FILE *fp = NULL; if (vtysh_pager_name) @@ -2702,7 +2702,7 @@ DEFUN (vtysh_write_memory, "Write configuration to the file (same as write memory)\n") { int ret = CMD_SUCCESS; - char line[] = "write memory\n"; + char line[] = "do write memory\n"; u_int i; fprintf (stdout, "Note: this version of vtysh never writes vtysh.conf\n"); |
