aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-24 20:57:53 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-24 20:57:53 +0000
commit2e55b6836042a621a8c182ceebfa0beab2ec85ab (patch)
tree74da2a513081a6b858905598704ceb7765a376be
parente046954d530cc7473ce1ae8d742209a68fe6dcae (diff)
downloadriscv-openocd-2e55b6836042a621a8c182ceebfa0beab2ec85ab.zip
riscv-openocd-2e55b6836042a621a8c182ceebfa0beab2ec85ab.tar.gz
riscv-openocd-2e55b6836042a621a8c182ceebfa0beab2ec85ab.tar.bz2
David Brownell <david-b@pacbell.net>:
The "Illegal mode for command" diagnostic is deeply useless. Say "Command '%s' only runs during configuration stage" instead, letting users know what the real issue is. git-svn-id: svn://svn.berlios.de/openocd/trunk@1908 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/helper/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index f57f7ae..a82eb4d 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -392,7 +392,7 @@ int run_command(command_context_t *context, command_t *c, char *words[], int num
if (!((context->mode == COMMAND_CONFIG) || (c->mode == COMMAND_ANY) || (c->mode == context->mode) ))
{
/* Config commands can not run after the config stage */
- LOG_ERROR("Illegal mode for command");
+ LOG_ERROR("Command '%s' only runs during configuration stage", c->name);
return ERROR_FAIL;
}