target: move regmaps to armv7m.c
[fw/openocd] / src / target / target_request.c
index 1fedfb222dd27e35eafb19db345f2645a432e0fd..090de9fe64f45ba0b37a6af302db63ec739baf39 100644 (file)
@@ -168,7 +168,7 @@ static int add_debug_msg_receiver(struct command_context *cmd_ctx, struct target
        struct debug_msg_receiver **p = &target->dbgmsg;
 
        if (target == NULL)
-               return ERROR_INVALID_ARGUMENTS;
+               return ERROR_COMMAND_SYNTAX_ERROR;
 
        /* see if there's already a list */
        if (*p)
@@ -302,7 +302,7 @@ COMMAND_HANDLER(handle_target_request_debugmsgs_command)
                }
                else
                {
-                       command_print(CMD_CTX, "usage: target_request debugmsgs ['enable'|'disable'|'charmsg']");
+                   return ERROR_COMMAND_SYNTAX_ERROR;
                }
        }
 
@@ -326,6 +326,7 @@ static const struct command_registration target_req_command_handlers[] = {
                .name = "target_request",
                .mode = COMMAND_ANY,
                .help = "target request command group",
+               .usage = "",
                .chain = target_req_exec_command_handlers,
        },
        COMMAND_REGISTRATION_DONE