From: zwelch Date: Sun, 24 May 2009 20:57:53 +0000 (+0000) Subject: David Brownell : X-Git-Tag: v0.2.0~602 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e55b6836042a621a8c182ceebfa0beab2ec85ab;p=openocd David Brownell : 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 --- diff --git a/src/helper/command.c b/src/helper/command.c index f57f7ae9..a82eb4da 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; }