Correct argument numbering in trace command00/1800/2
authorAlan Bowman <alan.michael.bowman@gmail.com>
Tue, 5 Nov 2013 22:25:51 +0000 (5 22:25 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 6 Nov 2013 12:59:04 +0000 (6 12:59 +0000)
The trace command was opening a file named with the source frequency.
This change correctly passes the filename that is specified.

Change-Id: Ia2eb8eda0e1e0f4f44b05c3a0ce7bef3bda51446
Signed-off-by: Alan Bowman <alan.michael.bowman@gmail.com>
Reviewed-on: http://openocd.zylin.com/1800
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/jtag/hla/hla_interface.c

index ae33f54..9193133 100644 (file)
@@ -243,7 +243,7 @@ COMMAND_HANDLER(interface_handle_trace_command)
        }
 
        if (CMD_ARGC == 2) {
-               f = fopen(CMD_ARGV[0], "a");
+               f = fopen(CMD_ARGV[1], "a");
                if (!f)
                        return ERROR_COMMAND_SYNTAX_ERROR;
        }