diff options
author | Karl Palsson <karlp@tweak.net.au> | 2014-11-21 22:05:41 +0000 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2015-01-09 08:48:18 +0000 |
commit | 881d08ddbd3ff8eac3bb53303868b8976323ce49 (patch) | |
tree | 4807ea5391bbfd873b157c32348aa7f00d6535ae /src/transport/transport.c | |
parent | 513436a17accbe5494f763055124be594bef0a45 (diff) | |
download | riscv-openocd-881d08ddbd3ff8eac3bb53303868b8976323ce49.zip riscv-openocd-881d08ddbd3ff8eac3bb53303868b8976323ce49.tar.gz riscv-openocd-881d08ddbd3ff8eac3bb53303868b8976323ce49.tar.bz2 |
transport: clarify error message when transport is not selected
When no transport is selected, the error message dumps the available
transports, but not how to actually select one.
Change-Id: I63da2a4b59e3f6cc8d30bd631e41a82636a056ef
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2406
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/transport/transport.c')
-rw-r--r-- | src/transport/transport.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/transport/transport.c b/src/transport/transport.c index 3f5337e..c57064b 100644 --- a/src/transport/transport.c +++ b/src/transport/transport.c @@ -239,12 +239,13 @@ COMMAND_HANDLER(handle_transport_init) { LOG_DEBUG("%s", __func__); if (!session) { - LOG_ERROR("session's transport is not selected."); + LOG_ERROR("session transport was not selected. Use 'transport select <transport>'"); /* no session transport configured, print transports then fail */ + LOG_ERROR("Transports available:"); const char * const *vector = allowed_transports; while (*vector) { - LOG_ERROR("allow transport '%s'", *vector); + LOG_ERROR("%s", *vector); vector++; } return ERROR_FAIL; @@ -277,7 +278,7 @@ static int jim_transport_select(Jim_Interp *interp, int argc, Jim_Obj * const *a switch (argc) { case 1: /* return/display */ if (!session) { - LOG_ERROR("session's transport is not selected."); + LOG_ERROR("session transport was not selected. Use 'transport select <transport>'"); return JIM_ERR; } else { Jim_SetResultString(interp, session->name, -1); |