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.
---
 src/helper/command.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.
---
 src/helper/command.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -392,7 +392,7 @@ int run_command(command_context_t *conte
 	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;
 	}
 
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to