This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7506

-- gerrit

commit 2b9ce3eb9efb7fad5a2fb57478a3ba63f96e996b
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Mon Dec 19 23:41:22 2022 +0100

    target: rewrite command 'examine_deferred' as COMMAND_HANDLER
    
    Check for empty command line, add the mandatory 'usage' field.
    
    Change-Id: I9c3606242ec3dda9026fe19222162a110e618bff
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/target/target.c b/src/target/target.c
index 264b85f218..a2c857a95b 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -5728,14 +5728,16 @@ COMMAND_HANDLER(handle_target_was_examined)
        return ERROR_OK;
 }
 
-static int jim_target_examine_deferred(Jim_Interp *interp, int argc, Jim_Obj * 
const *argv)
+COMMAND_HANDLER(handle_target_examine_deferred)
 {
-       struct command_context *cmd_ctx = current_command_context(interp);
-       assert(cmd_ctx);
-       struct target *target = get_current_target(cmd_ctx);
+       if (CMD_ARGC != 0)
+               return ERROR_COMMAND_SYNTAX_ERROR;
 
-       Jim_SetResultBool(interp, target->defer_examine);
-       return JIM_OK;
+       struct target *target = get_current_target(CMD_CTX);
+
+       command_print(CMD, "%d", target->defer_examine ? 1 : 0);
+
+       return ERROR_OK;
 }
 
 static int jim_target_halt_gdb(Jim_Interp *interp, int argc, Jim_Obj *const 
*argv)
@@ -6087,8 +6089,9 @@ static const struct command_registration 
target_instance_command_handlers[] = {
        {
                .name = "examine_deferred",
                .mode = COMMAND_EXEC,
-               .jim_handler = jim_target_examine_deferred,
+               .handler = handle_target_examine_deferred,
                .help = "used internally for reset processing",
+               .usage = "",
        },
        {
                .name = "arp_halt_gdb",

-- 

Reply via email to