diff options
author | Ben Pfaff <blp@ovn.org> | 2017-10-14 12:47:46 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-10-24 15:12:04 -0700 |
commit | 4410f206911d50aeeb879a2f3391afc752ac0ade (patch) | |
tree | 7796fb82f4bdd88e6b5921d49903a3c002c9f1ee | |
parent | 431e90b7c5f704d3d7fcbfbf8fcce50f08e0825f (diff) | |
download | openvswitch-4410f206911d50aeeb879a2f3391afc752ac0ade.tar.gz |
unixctl: Give better error message for unknown commands.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
-rw-r--r-- | lib/unixctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/unixctl.c b/lib/unixctl.c index 33c5412f1..d33dcac94 100644 --- a/lib/unixctl.c +++ b/lib/unixctl.c @@ -287,7 +287,9 @@ process_command(struct unixctl_conn *conn, struct jsonrpc_msg *request) params = json_array(request->params); command = shash_find_data(&commands, request->method); if (!command) { - error = xasprintf("\"%s\" is not a valid command", request->method); + error = xasprintf("\"%s\" is not a valid command (use " + "\"list-commands\" to see a list of valid commands)", + request->method); } else if (params->n < command->min_args) { error = xasprintf("\"%s\" command requires at least %d arguments", request->method, command->min_args); |