summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorSpencer Oliver <ntfreak@users.sourceforge.net>2010-02-04 10:33:33 +0000
committerSpencer Oliver <ntfreak@users.sourceforge.net>2010-02-04 10:33:33 +0000
commit709f08f17ad5128b86966365510dbe8f67736304 (patch)
tree040d2610ee2dc0f5bc24a448b31d0f9f06ab88f4 /src/helper
parent8b049fdba52459d54f63d39ae7b30abeef911e2b (diff)
downloadopenocd+libswd-709f08f17ad5128b86966365510dbe8f67736304.tar.gz
openocd+libswd-709f08f17ad5128b86966365510dbe8f67736304.tar.bz2
openocd+libswd-709f08f17ad5128b86966365510dbe8f67736304.tar.xz
openocd+libswd-709f08f17ad5128b86966365510dbe8f67736304.zip
CMD: duplicate cmd error msg
When registering cmds we report duplicate attempts to register a cmd as a LOG_ERROR. Some situations need this, such as when registering dual flash banks. http://www.mail-archive.com/openocd-development@lists.berlios.de/msg11152.html Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index ebd9aa62..3625508f 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -375,7 +375,10 @@ struct command* register_command(struct command_context *context,
struct command *c = command_find(*head, name);
if (NULL != c)
{
- LOG_ERROR("command '%s' is already registered in '%s' context",
+ /* TODO: originally we treated attempting to register a cmd twice as an error
+ * Sometimes we need this behaviour, such as with flash banks.
+ * http://www.mail-archive.com/openocd-development@lists.berlios.de/msg11152.html */
+ LOG_DEBUG("command '%s' is already registered in '%s' context",
name, parent ? parent->name : "<global>");
return c;
}