This is an automated email from Gerrit.

Antonio Borneo ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5077

-- gerrit

commit 8d69c50b5232034e1811202362c162ddecd10a5d
Author: Paul Fertser <[email protected]>
Date:   Mon Apr 1 05:22:35 2019 +0200

    target: change prototype of binprint()
    
    To prepare for handling TCL return values consistently, all calls
    to command_print/command_print_sameline should be ready to switch
    to CMD as first parameter.
    
    Change prototype of binprint() to pass CMD instead of CMD_CTX.
    
    This change was part of http://openocd.zylin.com/1815 from Paul
    Fertser and has been extracted and rebased to simplify the review.
    
    Change-Id: I5ebdc50417d97c791c98ac0cfe2218319809eb7f
    Signed-off-by: Paul Fertser <[email protected]>
    Signed-off-by: Tomas Vanek <[email protected]>
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/target/target.c b/src/target/target.c
index 9699005..18ef64d 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -5938,13 +5938,13 @@ COMMAND_HANDLER(handle_ps_command)
        }
 }
 
-static void binprint(struct command_context *cmd_ctx, const char *text, const 
uint8_t *buf, int size)
+static void binprint(struct command_invocation *cmd, const char *text, const 
uint8_t *buf, int size)
 {
        if (text != NULL)
-               command_print_sameline(cmd_ctx, "%s", text);
+               command_print_sameline(cmd->ctx, "%s", text);
        for (int i = 0; i < size; i++)
-               command_print_sameline(cmd_ctx, " %02x", buf[i]);
-       command_print(cmd_ctx, " ");
+               command_print_sameline(cmd->ctx, " %02x", buf[i]);
+       command_print(cmd->ctx, " ");
 }
 
 COMMAND_HANDLER(handle_test_mem_access_command)
@@ -6027,8 +6027,8 @@ COMMAND_HANDLER(handle_test_mem_access_command)
                                                        duration_kbps(&bench, 
count * size));
                                } else {
                                        command_print(CMD_CTX, "Compare 
failed");
-                                       binprint(CMD_CTX, "ref:", read_ref, 
host_bufsiz);
-                                       binprint(CMD_CTX, "buf:", read_buf, 
host_bufsiz);
+                                       binprint(CMD, "ref:", read_ref, 
host_bufsiz);
+                                       binprint(CMD, "buf:", read_buf, 
host_bufsiz);
                                }
 next:
                                free(read_ref);
@@ -6113,8 +6113,8 @@ out:
                                                        duration_kbps(&bench, 
count * size));
                                } else {
                                        command_print(CMD_CTX, "Compare 
failed");
-                                       binprint(CMD_CTX, "ref:", read_ref, 
num_bytes);
-                                       binprint(CMD_CTX, "buf:", read_buf, 
num_bytes);
+                                       binprint(CMD, "ref:", read_ref, 
num_bytes);
+                                       binprint(CMD, "buf:", read_buf, 
num_bytes);
                                }
 nextw:
                                free(read_ref);

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to