command_handler: change 'args' to CMD_ARGV
[openocd.git] / src / flash / lpc2900.c
index 67a510e09ea9e1a6f02d9d5fbc6e3e445e06021f..98b13bf110067dd453e81e2b3267359b23f04c3a 100644 (file)
@@ -623,7 +623,7 @@ COMMAND_HANDLER(lpc2900_handle_read_custom_command)
 
        /* Try and open the file */
        struct fileio fileio;
-       const char *filename = args[1];
+       const char *filename = CMD_ARGV[1];
        int ret = fileio_open( &fileio, filename, FILEIO_WRITE, FILEIO_BINARY );
        if( ret != ERROR_OK )
        {
@@ -668,7 +668,7 @@ COMMAND_HANDLER(lpc2900_handle_password_command)
 
 #define ISS_PASSWORD "I_know_what_I_am_doing"
 
-       lpc2900_info->risky = !strcmp( args[1], ISS_PASSWORD );
+       lpc2900_info->risky = !strcmp( CMD_ARGV[1], ISS_PASSWORD );
 
        if( !lpc2900_info->risky )
        {
@@ -723,8 +723,8 @@ COMMAND_HANDLER(lpc2900_handle_write_custom_command)
        image.base_address = 0;
        image.start_address_set = 0;
 
-       const char *filename = args[1];
-       const char *type = (CMD_ARGC >= 3) ? args[2] : NULL;
+       const char *filename = CMD_ARGV[1];
+       const char *type = (CMD_ARGC >= 3) ? CMD_ARGV[2] : NULL;
        retval = image_open(&image, filename, type);
        if (retval != ERROR_OK)
        {
@@ -823,8 +823,8 @@ COMMAND_HANDLER(lpc2900_handle_secure_sector_command)
 
        /* Read sector range, and do a sanity check. */
        int first, last;
-       COMMAND_PARSE_NUMBER(int, args[1], first);
-       COMMAND_PARSE_NUMBER(int, args[2], last);
+       COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], first);
+       COMMAND_PARSE_NUMBER(int, CMD_ARGV[2], last);
        if( (first >= bank->num_sectors) ||
            (last >= bank->num_sectors) ||
            (first > last) )
@@ -1034,7 +1034,7 @@ FLASH_BANK_COMMAND_HANDLER(lpc2900_flash_bank_command)
         * (if clock too slow), or for erase time (clock too fast).
         */
        uint32_t clk_sys_fmc;
-       COMMAND_PARSE_NUMBER(u32, args[6], clk_sys_fmc);
+       COMMAND_PARSE_NUMBER(u32, CMD_ARGV[6], clk_sys_fmc);
        lpc2900_info->clk_sys_fmc = clk_sys_fmc * 1000;
 
        uint32_t clock_limit;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)