]> git.sur5r.net Git - openocd/commitdiff
command_context_t -> struct command_context
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 21:25:47 +0000 (13:25 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 21:25:47 +0000 (13:25 -0800)
Remove misleading typedef and redundant suffix from struct command_context.

116 files changed:
src/ecosboard.c
src/flash/at91sam3.c
src/flash/at91sam7.c
src/flash/avrf.c
src/flash/cfi.c
src/flash/davinci_nand.c
src/flash/ecos.c
src/flash/faux.c
src/flash/flash.c
src/flash/flash.h
src/flash/lpc2000.c
src/flash/lpc2900.c
src/flash/lpc3180_nand_controller.c
src/flash/mflash.c
src/flash/mflash.h
src/flash/mx3_nand.c
src/flash/nand.c
src/flash/nand.h
src/flash/orion_nand.c
src/flash/pic32mx.c
src/flash/s3c24xx_nand.c
src/flash/s3c24xx_nand.h
src/flash/stellaris.c
src/flash/stm32x.c
src/flash/str7x.c
src/flash/str9x.c
src/flash/str9xpec.c
src/flash/tms470.c
src/hello.c
src/helper/command.c
src/helper/command.h
src/helper/configuration.c
src/helper/configuration.h
src/helper/ioutil.c
src/helper/log.c
src/helper/log.h
src/helper/options.c
src/jtag/amt_jtagaccel.c
src/jtag/arm-jtag-ew.c
src/jtag/at91rm9200.c
src/jtag/core.c
src/jtag/dummy.c
src/jtag/ep93xx.c
src/jtag/ft2232.c
src/jtag/gw16012.c
src/jtag/interface.h
src/jtag/jlink.c
src/jtag/jtag.h
src/jtag/parport.c
src/jtag/presto.c
src/jtag/rlink/rlink.c
src/jtag/tcl.c
src/jtag/usbprog.c
src/jtag/vsllink.c
src/jtag/zy1000/zy1000.c
src/openocd.c
src/pld/pld.c
src/pld/pld.h
src/pld/virtex2.c
src/server/gdb_server.c
src/server/gdb_server.h
src/server/server.c
src/server/server.h
src/server/tcl_server.c
src/server/tcl_server.h
src/server/telnet_server.c
src/server/telnet_server.h
src/svf/svf.c
src/svf/svf.h
src/target/arm11.c
src/target/arm11.h
src/target/arm720t.c
src/target/arm7_9_common.c
src/target/arm7_9_common.h
src/target/arm7tdmi.c
src/target/arm7tdmi.h
src/target/arm920t.c
src/target/arm920t.h
src/target/arm926ejs.c
src/target/arm926ejs.h
src/target/arm966e.c
src/target/arm966e.h
src/target/arm9tdmi.c
src/target/arm9tdmi.h
src/target/arm_adi_v5.c
src/target/arm_adi_v5.h
src/target/armv4_5.c
src/target/armv4_5.h
src/target/armv4_5_cache.c
src/target/armv4_5_cache.h
src/target/armv7a.c
src/target/armv7a.h
src/target/armv7m.c
src/target/armv7m.h
src/target/avrt.c
src/target/cortex_a8.c
src/target/cortex_m3.c
src/target/etb.c
src/target/etm.c
src/target/etm.h
src/target/etm_dummy.c
src/target/feroceon.c
src/target/mips32.c
src/target/mips32.h
src/target/mips_m4k.c
src/target/oocd_trace.c
src/target/target.c
src/target/target.h
src/target/target_request.c
src/target/target_request.h
src/target/target_type.h
src/target/trace.c
src/target/trace.h
src/target/xscale.c
src/xsvf/xsvf.c
src/xsvf/xsvf.h

index 455c93c05c72acbd4863621c777ed4580caac202..38f32525abad8d94bf22563f6f0994f24f43a0a7 100644 (file)
@@ -229,7 +229,7 @@ void reboot_port(void)
        cyg_thread_resume(zylinjtag_reboot_port_thread_handle);
 }
 
-int configuration_output_handler(struct command_context_s *context,
+int configuration_output_handler(struct command_context *context,
                const char* line)
 {
        diag_printf("%s", line);
@@ -237,7 +237,7 @@ int configuration_output_handler(struct command_context_s *context,
        return ERROR_OK;
 }
 
-int zy1000_configuration_output_handler_log(struct command_context_s *context,
+int zy1000_configuration_output_handler_log(struct command_context *context,
                const char* line)
 {
        LOG_USER_N("%s", line);
@@ -247,7 +247,7 @@ int zy1000_configuration_output_handler_log(struct command_context_s *context,
 
 #ifdef CYGPKG_PROFILE_GPROF
 
-int eCosBoard_handle_eCosBoard_profile_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+int eCosBoard_handle_eCosBoard_profile_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc)
 {
        command_print(cmd_ctx, "Profiling started");
        start_profile();
@@ -258,7 +258,7 @@ int eCosBoard_handle_eCosBoard_profile_command(struct command_context_s *cmd_ctx
 
 externC void phi_init_all_network_interfaces(void);
 
-command_context_t *cmd_ctx;
+struct command_context *cmd_ctx;
 
 static bool webRunning = false;
 
@@ -840,7 +840,7 @@ void startUart(void)
        cyg_thread_resume(zylinjtag_uart_thread_handle);
 }
 
-int handle_uart_command(struct command_context_s *cmd_ctx, char *cmd,
+int handle_uart_command(struct command_context *cmd_ctx, char *cmd,
                char **args, int argc)
 {
        static int current_baud = 38400;
@@ -924,7 +924,7 @@ bool logAllToSerial = false;
 int boolParam(char *var);
 
 
-command_context_t *setup_command_handler(void);
+struct command_context *setup_command_handler(void);
 
 static const char *zylin_config_dir="/config/settings";
 
@@ -936,7 +936,7 @@ static int add_default_dirs(void)
        return ERROR_OK;
 }
 
-int ioutil_init(struct command_context_s *cmd_ctx);
+int ioutil_init(struct command_context *cmd_ctx);
 
 int main(int argc, char *argv[])
 {
@@ -1068,7 +1068,7 @@ int main(int argc, char *argv[])
        add_default_dirs();
 
        /* initialize commandline interface */
-       command_context_t * cmd_ctx;
+       struct command_context * cmd_ctx;
        cmd_ctx = setup_command_handler();
        command_set_output_handler(cmd_ctx, configuration_output_handler, NULL);
        command_context_mode(cmd_ctx, COMMAND_CONFIG);
index b756e48f64a01f3c3a829007b1e69791ea82d61e..4459364e75e78d7b495fb4718079817e9937fb8b 100644 (file)
@@ -231,7 +231,7 @@ struct sam3_reg_list {
 static struct sam3_chip *all_sam3_chips;
 
 static struct sam3_chip *
-get_current_sam3(struct command_context_s *cmd_ctx)
+get_current_sam3(struct command_context *cmd_ctx)
 {
        struct target *t;
        static struct sam3_chip *p;
@@ -2472,7 +2472,7 @@ COMMAND_HANDLER(sam3_handle_slowclk_command)
 
 static int sam3_registered;
 static int
-sam3_register_commands(struct command_context_s *cmd_ctx)
+sam3_register_commands(struct command_context *cmd_ctx)
 {
        command_t *pCmd;
 
index 8f870bc0724d1be736efc3b77b4749640bdf6235..18cfb986770569f6abe3c0a39aee2eec7abbf876 100644 (file)
@@ -1178,7 +1178,7 @@ COMMAND_HANDLER(at91sam7_handle_gpnvm_command)
        return ERROR_OK;
 }
 
-static int at91sam7_register_commands(struct command_context_s *cmd_ctx)
+static int at91sam7_register_commands(struct command_context *cmd_ctx)
 {
        command_t *at91sam7_cmd = register_command(cmd_ctx, NULL, "at91sam7",
                        NULL, COMMAND_ANY, NULL);
index 9df254eaf8493dbe02f33657e10fbf1de8e8e761..ea9f0833388c51ea1b961e5349b8044c97785eef 100644 (file)
@@ -449,7 +449,7 @@ COMMAND_HANDLER(avrf_handle_mass_erase_command)
        return ERROR_OK;
 }
 
-static int avrf_register_commands(struct command_context_s *cmd_ctx)
+static int avrf_register_commands(struct command_context *cmd_ctx)
 {
        command_t *avr_cmd = register_command(cmd_ctx, NULL, "avr",
                        NULL, COMMAND_ANY, "avr flash specific commands");
index dd393de29433eab6df5acc9c5b45b0e462736fe5..d49ddf31aa361248d7ded621c42f4f115f3dab93 100644 (file)
@@ -588,7 +588,7 @@ static int cfi_intel_info(struct flash_bank *bank, char *buf, int buf_size)
        return ERROR_OK;
 }
 
-static int cfi_register_commands(struct command_context_s *cmd_ctx)
+static int cfi_register_commands(struct command_context *cmd_ctx)
 {
        /*command_t *cfi_cmd = */
        register_command(cmd_ctx, NULL, "cfi", NULL, COMMAND_ANY, "flash bank cfi <base> <size> <chip_width> <bus_width> <targetNum> [jedec_probe/x16_as_x8]");
index 4cef4084bae50d8e3bb36a46c1595ec3707f1257..413bcda4683f9d85e53e140ba51aa944d1e1fede 100644 (file)
@@ -78,7 +78,7 @@ static int halted(struct target *target, const char *label)
        return false;
 }
 
-static int davinci_register_commands(struct command_context_s *cmd_ctx)
+static int davinci_register_commands(struct command_context *cmd_ctx)
 {
        return ERROR_OK;
 }
index da3540731ca00552627471956808fbbc2283a97f..0525fbe3c712cd04392d93e3b61bb69fb83bdeae 100644 (file)
@@ -30,7 +30,7 @@
 static uint32_t ecosflash_get_flash_status(struct flash_bank *bank);
 static void ecosflash_set_flash_mode(struct flash_bank *bank,int mode);
 static uint32_t ecosflash_wait_status_busy(struct flash_bank *bank, uint32_t waitbits, int timeout);
-static int ecosflash_handle_gpnvm_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int ecosflash_handle_gpnvm_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc);
 #endif
 
 struct ecosflash_flash_bank
@@ -334,7 +334,7 @@ static int ecosflash_probe(struct flash_bank *bank)
        return ERROR_OK;
 }
 
-static int ecosflash_register_commands(struct command_context_s *cmd_ctx)
+static int ecosflash_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "ecosflash", NULL, COMMAND_ANY, NULL);
 
@@ -429,7 +429,7 @@ static uint32_t ecosflash_wait_status_busy(struct flash_bank *bank, uint32_t wai
        return ERROR_OK;
 }
 
-static int ecosflash_handle_gpnvm_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int ecosflash_handle_gpnvm_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc)
 {
        return ERROR_OK;
 }
index 55e9892c9d73ff0cb6d8e189cb4c2c375a439e44..b048fcb0aa21026fbd7381cc4fd453e940fdb2ff 100644 (file)
@@ -87,7 +87,7 @@ FLASH_BANK_COMMAND_HANDLER(faux_flash_bank_command)
        return ERROR_OK;
 }
 
-static int faux_register_commands(struct command_context_s *cmd_ctx)
+static int faux_register_commands(struct command_context *cmd_ctx)
 {
        return ERROR_OK;
 }
index 96c63d540bc6132788f060a4b1acad8f53e60030..32c1f4907668c5a5455abbf67f392b677fdbd9fe 100644 (file)
@@ -199,7 +199,7 @@ struct flash_bank *get_flash_bank_by_num(int num)
 }
 
 int flash_command_get_bank_by_num(
-       struct command_context_s *cmd_ctx, const char *str, struct flash_bank **bank)
+       struct command_context *cmd_ctx, const char *str, struct flash_bank **bank)
 {
        unsigned bank_num;
        COMMAND_PARSE_NUMBER(uint, str, bank_num);
@@ -511,7 +511,7 @@ COMMAND_HANDLER(handle_flash_protect_check_command)
        return ERROR_OK;
 }
 
-static int flash_check_sector_parameters(struct command_context_s *cmd_ctx,
+static int flash_check_sector_parameters(struct command_context *cmd_ctx,
                uint32_t first, uint32_t last, uint32_t num_sectors)
 {
        if (!(first <= last)) {
@@ -1217,7 +1217,7 @@ int default_flash_blank_check(struct flash_bank *bank)
        return ERROR_OK;
 }
 
-int flash_init_drivers(struct command_context_s *cmd_ctx)
+int flash_init_drivers(struct command_context *cmd_ctx)
 {
        register_jim(cmd_ctx, "ocd_flash_banks",
                        jim_flash_banks, "return information about the flash banks");
@@ -1267,7 +1267,7 @@ int flash_init_drivers(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-int flash_register_commands(struct command_context_s *cmd_ctx)
+int flash_register_commands(struct command_context *cmd_ctx)
 {
        flash_cmd = register_command(cmd_ctx, NULL, "flash",
                        NULL, COMMAND_ANY, NULL);
index 202a5e5231fe3c0e326e9d159313be60153200cd..4651fc3664175cf4fb067f990d39990920e014b2 100644 (file)
@@ -97,7 +97,7 @@ struct flash_driver
         *
         * @returns ERROR_OK if successful; otherwise, an error code.
         */
-       int (*register_commands)(struct command_context_s *cmd_ctx);
+       int (*register_commands)(struct command_context *cmd_ctx);
 
        /**
         * Finish the "flash bank" command for @a bank.  The
@@ -265,9 +265,9 @@ struct flash_bank
 };
 
 /// Registers the 'flash' subsystem commands
-int flash_register_commands(struct command_context_s *cmd_ctx);
+int flash_register_commands(struct command_context *cmd_ctx);
 /// Initializes the 'flash' subsystem drivers
-int flash_init_drivers(struct command_context_s *cmd_ctx);
+int flash_init_drivers(struct command_context *cmd_ctx);
 
 /**
  * Erases @a length bytes in the @a target flash, starting at @a addr.
@@ -323,7 +323,7 @@ struct flash_bank *get_flash_bank_by_num(int num);
  * @param bank On output, contians a pointer to the bank or NULL.
  * @returns ERROR_OK on success, or an error indicating the problem.
  */
-int flash_command_get_bank_by_num(struct command_context_s *cmd_ctx,
+int flash_command_get_bank_by_num(struct command_context *cmd_ctx,
                const char *str, struct flash_bank **bank);
 /**
  * Returns the flash bank like get_flash_bank_by_num(), without probing.
index 36ebc0ecf007a8d0a1a7b77fd3fb14b32283b711..f3d7e5b4a30cce7875041cfc001c1640aded2af9 100644 (file)
@@ -776,7 +776,7 @@ COMMAND_HANDLER(lpc2000_handle_part_id_command)
        return ERROR_OK;
 }
 
-static int lpc2000_register_commands(struct command_context_s *cmd_ctx)
+static int lpc2000_register_commands(struct command_context *cmd_ctx)
 {
        command_t *lpc2000_cmd = register_command(cmd_ctx, NULL, "lpc2000",
                        NULL, COMMAND_ANY, NULL);
index d385a302f87794c80237dbea15120aeb969ec201..4cf20921655cc1cb7d4a7d212afe1d95fe5a937f 100644 (file)
@@ -952,7 +952,7 @@ COMMAND_HANDLER(lpc2900_handle_secure_jtag_command)
 /**
  * Register private command handlers.
  */
-static int lpc2900_register_commands(struct command_context_s *cmd_ctx)
+static int lpc2900_register_commands(struct command_context *cmd_ctx)
 {
        command_t *lpc2900_cmd = register_command(cmd_ctx, NULL, "lpc2900",
                                                  NULL, COMMAND_ANY, NULL);
index 4a15e3645625c6f9c22ab3ee5618460b8271d999..ffa505579f1024485cb1b9afa50c11a55b07d066 100644 (file)
@@ -873,7 +873,7 @@ COMMAND_HANDLER(handle_lpc3180_select_command)
        return ERROR_OK;
 }
 
-static int lpc3180_register_commands(struct command_context_s *cmd_ctx)
+static int lpc3180_register_commands(struct command_context *cmd_ctx)
 {
        command_t *lpc3180_cmd = register_command(cmd_ctx, NULL, "lpc3180", NULL, COMMAND_ANY, "commands specific to the LPC3180 NAND flash controllers");
 
index 698cd16e7aa1850d0884097d7c7010f32986f94d..029178d12c7bd67a21f5b1d5be26c87046d722b0 100644 (file)
@@ -1265,7 +1265,7 @@ COMMAND_HANDLER(mg_config_cmd)
        }
 }
 
-int mflash_init_drivers(struct command_context_s *cmd_ctx)
+int mflash_init_drivers(struct command_context *cmd_ctx)
 {
        if (mflash_bank) {
                register_command(cmd_ctx, mflash_cmd, "probe", mg_probe_cmd, COMMAND_EXEC, NULL);
@@ -1320,7 +1320,7 @@ COMMAND_HANDLER(mg_bank_cmd)
        return ERROR_OK;
 }
 
-int mflash_register_commands(struct command_context_s *cmd_ctx)
+int mflash_register_commands(struct command_context *cmd_ctx)
 {
        mflash_cmd = register_command(cmd_ctx, NULL, "mflash", NULL, COMMAND_ANY, NULL);
        register_command(cmd_ctx, mflash_cmd, "bank", mg_bank_cmd, COMMAND_CONFIG,
index a2bd5b3a888da748982d64acdc51d3ef543ae5c3..ed4a2cddf5d2ffeb2c15a9ed9f2e7facbcb0b3d9 100644 (file)
@@ -141,8 +141,8 @@ struct mflash_bank
        struct mg_drv_info *drv_info;
 };
 
-int mflash_register_commands(struct command_context_s *cmd_ctx);
-int mflash_init_drivers(struct command_context_s *cmd_ctx);
+int mflash_register_commands(struct command_context *cmd_ctx);
+int mflash_init_drivers(struct command_context *cmd_ctx);
 
 #define MG_MFLASH_SECTOR_SIZE          (0x200)         /* 512Bytes = 2^9 */
 #define MG_MFLASH_SECTOR_SIZE_MASK     (0x200-1)
index 6c699179ec461d41a24da2416e549b31c96f55b2..45d2a3235cceeb77dc9bce6d3cebf46dedcf4175 100644 (file)
@@ -315,7 +315,7 @@ static int imx31_nand_ready (struct nand_device *nand, int timeout)
        return imx31_controller_ready (nand, timeout);
 }
 
-static int imx31_register_commands (struct command_context_s *cmd_ctx)
+static int imx31_register_commands (struct command_context *cmd_ctx)
 {
        return ERROR_OK;
 }
index 48f65206aae7caefb262064cad49ea9e83b2770c..4094effcb15b3beb557a520b6f81241f9c697190 100644 (file)
@@ -279,7 +279,7 @@ COMMAND_HANDLER(handle_nand_device_command)
        return ERROR_OK;
 }
 
-int nand_register_commands(struct command_context_s *cmd_ctx)
+int nand_register_commands(struct command_context *cmd_ctx)
 {
        nand_cmd = register_command(cmd_ctx, NULL, "nand", NULL, COMMAND_ANY, "NAND specific commands");
 
@@ -304,7 +304,7 @@ struct nand_device *get_nand_device_by_num(int num)
        return NULL;
 }
 
-int nand_command_get_device_by_num(struct command_context_s *cmd_ctx,
+int nand_command_get_device_by_num(struct command_context *cmd_ctx,
                const char *str, struct nand_device **nand)
 {
        unsigned num;
@@ -1602,7 +1602,7 @@ COMMAND_HANDLER(handle_nand_raw_access_command)
        return ERROR_OK;
 }
 
-int nand_init(struct command_context_s *cmd_ctx)
+int nand_init(struct command_context *cmd_ctx)
 {
        if (!nand_devices)
                return ERROR_OK;
index 80963095948b2663d79d8c0c7c1a67ff289d0596..afec9a7757e85cc9f0145cf3a82bceb0cd6aef8f 100644 (file)
@@ -36,7 +36,7 @@ struct nand_flash_controller
 {
        char *name;
        __NAND_DEVICE_COMMAND((*nand_device_command));
-       int (*register_commands)(struct command_context_s *cmd_ctx);
+       int (*register_commands)(struct command_context *cmd_ctx);
        int (*init)(struct nand_device *nand);
        int (*reset)(struct nand_device *nand);
        int (*command)(struct nand_device *nand, uint8_t command);
@@ -226,11 +226,11 @@ int nand_calculate_ecc(struct nand_device *nand,
 int nand_calculate_ecc_kw(struct nand_device *nand,
                const uint8_t *dat, uint8_t *ecc_code);
 
-int nand_register_commands(struct command_context_s *cmd_ctx);
-int nand_init(struct command_context_s *cmd_ctx);
+int nand_register_commands(struct command_context *cmd_ctx);
+int nand_init(struct command_context *cmd_ctx);
 
 /// helper for parsing a nand device command argument string
-int nand_command_get_device_by_num(struct command_context_s *cmd_ctx,
+int nand_command_get_device_by_num(struct command_context *cmd_ctx,
                const char *str, struct nand_device **nand);
 
 
index 0d4e1ea8cc88faac249248ccdea3ccdfe0004ce6..4235b0853bb40ed13e6a7a7be9122404b7a20d38 100644 (file)
@@ -120,7 +120,7 @@ static int orion_nand_controller_ready(struct nand_device *nand, int timeout)
        return 1;
 }
 
-static int orion_nand_register_commands(struct command_context_s *cmd_ctx)
+static int orion_nand_register_commands(struct command_context *cmd_ctx)
 {
        return ERROR_OK;
 }
index e19ee950552e29e9f4799259733d267cb313c3c2..bb3d69c16bc45654ddb9985e273de0bcdcdf9e7d 100644 (file)
@@ -883,7 +883,7 @@ COMMAND_HANDLER(pic32mx_handle_pgm_word_command)
        return ERROR_OK;
 }
 
-static int pic32mx_register_commands(struct command_context_s *cmd_ctx)
+static int pic32mx_register_commands(struct command_context *cmd_ctx)
 {
        command_t *pic32mx_cmd = register_command(cmd_ctx, NULL, "pic32mx",
                        NULL, COMMAND_ANY, "pic32mx flash specific commands");
index 5b2d191f3195be90c6be1c37e9675e78e84d508b..75b8700c002c9f5d4776418967735ccafd3a5f74 100644 (file)
@@ -52,7 +52,7 @@ S3C24XX_DEVICE_COMMAND()
        return ERROR_OK;
 }
 
-int s3c24xx_register_commands(struct command_context_s *cmd_ctx)
+int s3c24xx_register_commands(struct command_context *cmd_ctx)
 {
        return ERROR_OK;
 }
index 41c95f52512a802079e37f6699e15855acdb2e97..4829c7c4f22eeb5d18ac759e781e2db18c36bbe3 100644 (file)
@@ -59,7 +59,7 @@ S3C24XX_DEVICE_COMMAND();
                        return retval; \
        } while (0)
 
-int s3c24xx_register_commands(struct command_context_s *cmd_ctx);
+int s3c24xx_register_commands(struct command_context *cmd_ctx);
 
 int s3c24xx_reset(struct nand_device *nand);
 
index efda8590e20894cac648edb8405f01347c9bdf23..910d047dc01e11ecf6ffe55d0ffd13af9b1d0e4a 100644 (file)
@@ -1160,7 +1160,7 @@ COMMAND_HANDLER(stellaris_handle_mass_erase_command)
        return ERROR_OK;
 }
 
-static int stellaris_register_commands(struct command_context_s *cmd_ctx)
+static int stellaris_register_commands(struct command_context *cmd_ctx)
 {
        command_t *stm32x_cmd = register_command(cmd_ctx, NULL, "stellaris",
                        NULL, COMMAND_ANY, "stellaris flash specific commands");
index cf842fcf74f0f6002685dd0da5eb2bb3aba170d2..abbf6cb61b9e1f44566ddd93e635011339306003 100644 (file)
@@ -1181,7 +1181,7 @@ COMMAND_HANDLER(stm32x_handle_mass_erase_command)
        return ERROR_OK;
 }
 
-static int stm32x_register_commands(struct command_context_s *cmd_ctx)
+static int stm32x_register_commands(struct command_context *cmd_ctx)
 {
        command_t *stm32x_cmd = register_command(cmd_ctx, NULL, "stm32x",
                        NULL, COMMAND_ANY, "stm32x flash specific commands");
index fa2355098aee16b4a79ea96d84be352ed2f77bff..83070134e7a61b15878bbce7a46bdaf2b5ad0255 100644 (file)
@@ -671,7 +671,7 @@ COMMAND_HANDLER(str7x_handle_disable_jtag_command)
        return ERROR_OK;
 }
 
-static int str7x_register_commands(struct command_context_s *cmd_ctx)
+static int str7x_register_commands(struct command_context *cmd_ctx)
 {
        command_t *str7x_cmd = register_command(cmd_ctx, NULL, "str7x",
                        NULL, COMMAND_ANY, "str7x flash specific commands");
index b3e8dffc7a3a36ac734a6fc5626b77b4b781e06f..a06bd1ec49a8a49362377e4a95f8e2caeb87f978 100644 (file)
@@ -675,7 +675,7 @@ COMMAND_HANDLER(str9x_handle_flash_config_command)
        return ERROR_OK;
 }
 
-static int str9x_register_commands(struct command_context_s *cmd_ctx)
+static int str9x_register_commands(struct command_context *cmd_ctx)
 {
        command_t *str9x_cmd = register_command(cmd_ctx, NULL, "str9x",
                        NULL, COMMAND_ANY, "str9x flash commands");
index 6c42ce3e9a77988a5adc97b7822908fb79791231..03a8ea2e65e7548b8ff41fd17aa1339dede6288d 100644 (file)
@@ -1163,7 +1163,7 @@ COMMAND_HANDLER(str9xpec_handle_flash_disable_turbo_command)
        return ERROR_OK;
 }
 
-static int str9xpec_register_commands(struct command_context_s *cmd_ctx)
+static int str9xpec_register_commands(struct command_context *cmd_ctx)
 {
        command_t *str9xpec_cmd = register_command(cmd_ctx, NULL, "str9xpec",
                        NULL, COMMAND_ANY, "str9xpec flash specific commands");
index 6e1516f35b74d0c1c1a040cdee0654aeae755e33..a5f2f36a5a4a27534a43033fd1b0d8d8c630815d 100644 (file)
@@ -817,7 +817,7 @@ static int tms470_erase_sector(struct flash_bank *bank, int sector)
               Implementation of Flash Driver Interfaces
    ---------------------------------------------------------------------- */
 
-static int tms470_register_commands(struct command_context_s *cmd_ctx)
+static int tms470_register_commands(struct command_context *cmd_ctx)
 {
        command_t *tms470_cmd = register_command(cmd_ctx, NULL, "tms470", NULL, COMMAND_ANY, "applies to TI tms470 family");
 
index 8a4f701d9bcd61ca444dea3ab71b099df9f630a4..267cc28e4eda264c8f1e33c489104930dcc2def8 100644 (file)
@@ -48,7 +48,7 @@ COMMAND_HANDLER(handle_hello_command)
        return retval;
 }
 
-int hello_register_commands(struct command_context_s *cmd_ctx)
+int hello_register_commands(struct command_context *cmd_ctx)
 {
        struct command_s *cmd = register_command(cmd_ctx, NULL, "hello",
                        &handle_hello_command, COMMAND_ANY,
index 3cd11d218f4edba908b91ba9b4914e8a9ea7e039..60a4a26ee92b25611b4cdb6dbbf2dd496f94c9cc 100644 (file)
@@ -47,7 +47,7 @@
 int fast_and_dangerous = 0;
 Jim_Interp *interp = NULL;
 
-static int run_command(command_context_t *context,
+static int run_command(struct command_context *context,
                command_t *c, const char *words[], unsigned num_words);
 
 static void tcl_output(void *privData, const char *file, unsigned line,
@@ -57,7 +57,7 @@ static void tcl_output(void *privData, const char *file, unsigned line,
        Jim_AppendString(interp, tclOutput, string, strlen(string));
 }
 
-extern command_context_t *global_cmd_ctx;
+extern struct command_context *global_cmd_ctx;
 
 void script_debug(Jim_Interp *interp, const char *name,
                unsigned argc, Jim_Obj *const *argv)
@@ -80,7 +80,7 @@ static int script_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 {
        /* the private data is stashed in the interp structure */
        command_t *c;
-       command_context_t *context;
+       struct command_context *context;
        int retval;
        int i;
        int nwords;
@@ -226,7 +226,7 @@ static void command_add_child(struct command_s **head, struct command_s *c)
        cc->next = c;
 }
 
-command_t* register_command(command_context_t *context,
+command_t* register_command(struct command_context *context,
                command_t *parent, char *name, command_handler_t handler,
                enum command_mode mode, char *help)
 {
@@ -274,7 +274,7 @@ command_t* register_command(command_context_t *context,
        return c;
 }
 
-int unregister_all_commands(command_context_t *context)
+int unregister_all_commands(struct command_context *context)
 {
        command_t *c, *c2;
 
@@ -306,7 +306,7 @@ int unregister_all_commands(command_context_t *context)
        return ERROR_OK;
 }
 
-int unregister_command(command_context_t *context, char *name)
+int unregister_command(struct command_context *context, char *name)
 {
        command_t *c, *p = NULL, *c2;
 
@@ -358,14 +358,14 @@ int unregister_command(command_context_t *context, char *name)
        return ERROR_OK;
 }
 
-void command_output_text(command_context_t *context, const char *data)
+void command_output_text(struct command_context *context, const char *data)
 {
        if (context && context->output_handler && data) {
                context->output_handler(context, data);
        }
 }
 
-void command_print_sameline(command_context_t *context, const char *format, ...)
+void command_print_sameline(struct command_context *context, const char *format, ...)
 {
        char *string;
 
@@ -389,7 +389,7 @@ void command_print_sameline(command_context_t *context, const char *format, ...)
        va_end(ap);
 }
 
-void command_print(command_context_t *context, const char *format, ...)
+void command_print(struct command_context *context, const char *format, ...)
 {
        char *string;
 
@@ -436,7 +436,7 @@ char *command_name(struct command_s *c, char delim)
        return __command_name(c, delim, 0);
 }
 
-static int run_command(command_context_t *context,
+static int run_command(struct command_context *context,
                command_t *c, const char *words[], unsigned num_words)
 {
        int start_word = 0;
@@ -475,7 +475,7 @@ static int run_command(command_context_t *context,
        return retval;
 }
 
-int command_run_line(command_context_t *context, char *line)
+int command_run_line(struct command_context *context, char *line)
 {
        /* all the parent commands have been registered with the interpreter
         * so, can just evaluate the line as a script and check for
@@ -545,7 +545,7 @@ int command_run_line(command_context_t *context, char *line)
        return retval;
 }
 
-int command_run_linef(command_context_t *context, const char *format, ...)
+int command_run_linef(struct command_context *context, const char *format, ...)
 {
        int retval = ERROR_FAIL;
        char *string;
@@ -560,23 +560,23 @@ int command_run_linef(command_context_t *context, const char *format, ...)
        return retval;
 }
 
-void command_set_output_handler(command_context_t* context,
+void command_set_output_handler(struct command_context* context,
                command_output_handler_t output_handler, void *priv)
 {
        context->output_handler = output_handler;
        context->output_handler_priv = priv;
 }
 
-command_context_t* copy_command_context(command_context_t* context)
+struct command_context* copy_command_context(struct command_context* context)
 {
-       command_context_t* copy_context = malloc(sizeof(command_context_t));
+       struct command_context* copy_context = malloc(sizeof(struct command_context));
 
        *copy_context = *context;
 
        return copy_context;
 }
 
-int command_done(command_context_t *context)
+int command_done(struct command_context *context)
 {
        free(context);
        context = NULL;
@@ -764,9 +764,9 @@ COMMAND_HANDLER(handle_fast_command)
 }
 
 
-command_context_t* command_init()
+struct command_context* command_init()
 {
-       command_context_t* context = malloc(sizeof(command_context_t));
+       struct command_context* context = malloc(sizeof(struct command_context));
        extern const char startup_tcl[];
        const char *HostOs;
 
@@ -846,7 +846,7 @@ command_context_t* command_init()
        return context;
 }
 
-int command_context_mode(command_context_t *cmd_ctx, enum command_mode mode)
+int command_context_mode(struct command_context *cmd_ctx, enum command_mode mode)
 {
        if (!cmd_ctx)
                return ERROR_INVALID_ARGUMENTS;
@@ -869,7 +869,7 @@ void process_jim_events(void)
 #endif
 }
 
-void register_jim(struct command_context_s *cmd_ctx, const char *name, int (*cmd)(Jim_Interp *interp, int argc, Jim_Obj *const *argv), const char *help)
+void register_jim(struct command_context *cmd_ctx, const char *name, int (*cmd)(Jim_Interp *interp, int argc, Jim_Obj *const *argv), const char *help)
 {
        Jim_CreateCommand(interp, name, cmd, NULL, NULL);
 
index bddb053ee587e59fda4cfdea63f9bf23fa36b5fb..169852ef6d0425ed56d1a68cd024a88c3985d357 100644 (file)
@@ -51,13 +51,13 @@ enum command_mode
        COMMAND_ANY,
 };
 
-struct command_context_s;
+struct command_context;
 
 /// The type signature for command context's output handler.
-typedef int (*command_output_handler_t)(struct command_context_s *context,
+typedef int (*command_output_handler_t)(struct command_context *context,
                                const char* line);
 
-typedef struct command_context_s
+struct command_context
 {
        enum command_mode mode;
        struct command_s *commands;
@@ -78,7 +78,7 @@ typedef struct command_context_s
         */
        command_output_handler_t output_handler;
        void *output_handler_priv;
-} command_context_t;
+};
 
 
 /**
@@ -87,7 +87,7 @@ typedef struct command_context_s
  * defining all such derivative types using this macro.
  */
 #define __COMMAND_HANDLER(name, extra...) \
-               int name(struct command_context_s *cmd_ctx, \
+               int name(struct command_context *cmd_ctx, \
                                const char *args[], unsigned argc, ##extra)
 
 /**
@@ -151,31 +151,31 @@ typedef struct command_s
  */
 char *command_name(struct command_s *c, char delim);
 
-command_t* register_command(command_context_t *context,
+command_t* register_command(struct command_context *context,
                command_t *parent, char *name, command_handler_t handler,
                enum command_mode mode, char *help);
 
-int unregister_command(command_context_t *context, char *name);
-int unregister_all_commands(command_context_t *context);
+int unregister_command(struct command_context *context, char *name);
+int unregister_all_commands(struct command_context *context);
 
-void command_set_output_handler(command_context_t* context,
+void command_set_output_handler(struct command_context* context,
                command_output_handler_t output_handler, void *priv);
 
-command_context_t* copy_command_context(command_context_t* context);
+struct command_context* copy_command_context(struct command_context* context);
 
-int command_context_mode(command_context_t *context, enum command_mode mode);
+int command_context_mode(struct command_context *context, enum command_mode mode);
 
-command_context_t* command_init(void);
-int command_done(command_context_t *context);
+struct command_context* command_init(void);
+int command_done(struct command_context *context);
 
-void command_print(command_context_t *context, const char *format, ...)
+void command_print(struct command_context *context, const char *format, ...)
                __attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 2, 3)));
-void command_print_sameline(command_context_t *context, const char *format, ...)
+void command_print_sameline(struct command_context *context, const char *format, ...)
                __attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 2, 3)));
-int command_run_line(command_context_t *context, char *line);
-int command_run_linef(command_context_t *context, const char *format, ...)
+int command_run_line(struct command_context *context, char *line);
+int command_run_linef(struct command_context *context, const char *format, ...)
                __attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 2, 3)));
-void command_output_text(command_context_t *context, const char *data);
+void command_output_text(struct command_context *context, const char *data);
 
 void process_jim_events(void);
 
@@ -190,7 +190,7 @@ extern int fast_and_dangerous;
 
 extern Jim_Interp *interp;
 
-void register_jim(command_context_t *context, const char *name, int (*cmd)(Jim_Interp *interp, int argc, Jim_Obj *const *argv), const char *help);
+void register_jim(struct command_context *context, const char *name, int (*cmd)(Jim_Interp *interp, int argc, Jim_Obj *const *argv), const char *help);
 
 long jim_global_long(const char *variable);
 
index 3c44d6d470077703ae93efe5224c49d4cef15d0d..1f7240d9eb4ae5c49b67053e18d1b0c82b79f158 100644 (file)
@@ -103,7 +103,7 @@ FILE *open_file_from_path (char *file, char *mode)
        }
 }
 
-int parse_config_file(struct command_context_s *cmd_ctx)
+int parse_config_file(struct command_context *cmd_ctx)
 {
        int retval;
        char **cfg;
index 5d601485a9661a40732061638131e4243ede03db..9b77a2561561aed7455fd0dc171964d04c0c19a1 100644 (file)
 
 #include "command.h"
 
-int parse_cmdline_args(struct command_context_s *cmd_ctx,
+int parse_cmdline_args(struct command_context *cmd_ctx,
                int argc, char *argv[]);
 
-int parse_config_file(struct command_context_s *cmd_ctx);
+int parse_config_file(struct command_context *cmd_ctx);
 void add_config_command(const char *cfg);
 
 void add_script_search_dir(const char *dir);
 
-int configuration_output_handler(struct command_context_s *cmd_ctx,
+int configuration_output_handler(struct command_context *cmd_ctx,
                const char *line);
 
 FILE *open_file_from_path(char *file, char *mode);
index 3a62961142d7d6556d7c8416b60d352d0a201540..a9474a636ac4555589813f31887ede3b2c528fe9 100644 (file)
@@ -645,7 +645,7 @@ static int zylinjtag_Jim_Command_mac(Jim_Interp *interp, int argc,
 
 
 
-int ioutil_init(struct command_context_s *cmd_ctx)
+int ioutil_init(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "rm", handle_rm_command, COMMAND_ANY,
                        "remove file");
index 1724beccbb61de7b40acbba74e7a01fa17d4028c..c6906543b3b56afe29f016cc541989be7651c096 100644 (file)
@@ -317,7 +317,7 @@ COMMAND_HANDLER(handle_log_output_command)
        return ERROR_OK;
 }
 
-int log_register_commands(struct command_context_s *cmd_ctx)
+int log_register_commands(struct command_context *cmd_ctx)
 {
        start = timeval_ms();
        register_command(cmd_ctx, NULL, "log_output", handle_log_output_command,
@@ -328,7 +328,7 @@ int log_register_commands(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-int log_init(struct command_context_s *cmd_ctx)
+int log_init(struct command_context *cmd_ctx)
 {
        /* set defaults for daemon configuration, if not set by cmdline or cfgfile */
        if (debug_level == -1)
@@ -344,7 +344,7 @@ int log_init(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-int set_log_output(struct command_context_s *cmd_ctx, FILE *output)
+int set_log_output(struct command_context *cmd_ctx, FILE *output)
 {
        log_output = output;
        return ERROR_OK;
index 5742897d8c958a70c9dcc067239d16482ed69bb9..3bf9840a9fc2833fbe3566010ea3c5cc07d7f984 100644 (file)
@@ -66,10 +66,10 @@ void log_printf_lf(enum log_levels level, const char *file, int line,
        const char *function, const char *format, ...)
 __attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 5, 6)));
 
-int log_init(struct command_context_s *cmd_ctx);
-int set_log_output(struct command_context_s *cmd_ctx, FILE *output);
+int log_init(struct command_context *cmd_ctx);
+int set_log_output(struct command_context *cmd_ctx, FILE *output);
 
-int log_register_commands(struct command_context_s *cmd_ctx);
+int log_register_commands(struct command_context *cmd_ctx);
 
 void keep_alive(void);
 void kept_alive(void);
index a0c9a9e92859cef112913c985bbe1a7f4b7a856f..3ffc6736e86ea6ececbbb2b1e42c897a6c58b056 100644 (file)
@@ -46,7 +46,7 @@ static struct option long_options[] =
        {0, 0, 0, 0}
 };
 
-int configuration_output_handler(struct command_context_s *context, const char* line)
+int configuration_output_handler(struct command_context *context, const char* line)
 {
        LOG_USER_N("%s", line);
 
@@ -108,7 +108,7 @@ static void add_default_dirs(void)
 #endif
 }
 
-int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[])
+int parse_cmdline_args(struct command_context *cmd_ctx, int argc, char *argv[])
 {
        int c;
        char command_buffer[128];
index 87d9cd3c2fca310a62be72de272dab124f09e88a..3fb77f8eb0d0766c56279010cdf6041d43a5c7a9 100644 (file)
@@ -540,7 +540,7 @@ COMMAND_HANDLER(amt_jtagaccel_handle_rtck_command)
        return ERROR_OK;
 }
 
-static int amt_jtagaccel_register_commands(struct command_context_s *cmd_ctx)
+static int amt_jtagaccel_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "parport_port",
                        amt_jtagaccel_handle_parport_port_command, COMMAND_CONFIG,
index d2e3ff7d915d1e2dc46a7218326c0d83f3954f6b..0568d1c8672bada76cfa9116ecc415aba6bb52d9 100644 (file)
@@ -59,12 +59,12 @@ static uint8_t usb_out_buffer[ARMJTAGEW_OUT_BUFFER_SIZE];
 static int armjtagew_execute_queue(void);
 static int armjtagew_speed(int speed);
 static int armjtagew_khz(int khz, int *jtag_speed);
-static int armjtagew_register_commands(struct command_context_s *cmd_ctx);
+static int armjtagew_register_commands(struct command_context *cmd_ctx);
 static int armjtagew_init(void);
 static int armjtagew_quit(void);
 
 /* CLI command handler functions */
-static int armjtagew_handle_armjtagew_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int armjtagew_handle_armjtagew_info_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc);
 
 /* Queue command functions */
 static void armjtagew_end_state(tap_state_t state);
@@ -240,7 +240,7 @@ static int armjtagew_khz(int khz, int *jtag_speed)
        return ERROR_OK;
 }
 
-static int armjtagew_register_commands(struct command_context_s *cmd_ctx)
+static int armjtagew_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "armjtagew_info", armjtagew_handle_armjtagew_info_command, COMMAND_EXEC,
                "query armjtagew info");
@@ -520,7 +520,7 @@ static int armjtagew_get_version_info(void)
        return ERROR_OK;
 }
 
-static int armjtagew_handle_armjtagew_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int armjtagew_handle_armjtagew_info_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc)
 {
        if (armjtagew_get_version_info() == ERROR_OK)
        {
index 706257533e3a02132a3e447e8126c2f9d44fb235..dc9797e09475306324e53499e55fa3bd39bb3165 100644 (file)
@@ -118,7 +118,7 @@ static void at91rm9200_write(int tck, int tms, int tdi);
 static void at91rm9200_reset(int trst, int srst);
 
 static int at91rm9200_speed(int speed);
-static int at91rm9200_register_commands(struct command_context_s *cmd_ctx);
+static int at91rm9200_register_commands(struct command_context *cmd_ctx);
 static int at91rm9200_init(void);
 static int at91rm9200_quit(void);
 
@@ -185,7 +185,7 @@ static int at91rm9200_speed(int speed)
        return ERROR_OK;
 }
 
-static int at91rm9200_handle_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int at91rm9200_handle_device_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc)
 {
        if (argc == 0)
                return ERROR_OK;
@@ -200,7 +200,7 @@ static int at91rm9200_handle_device_command(struct command_context_s *cmd_ctx, c
        return ERROR_OK;
 }
 
-static int at91rm9200_register_commands(struct command_context_s *cmd_ctx)
+static int at91rm9200_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "at91rm9200_device", at91rm9200_handle_device_command,
                COMMAND_CONFIG, NULL);
index 1c2e2655cadcb12e5266c82e98913a8fa0a2d5c4..1841dde9f4c311a3e5967b3511cdd063e798b41c 100644 (file)
@@ -1334,7 +1334,7 @@ void jtag_tap_free(struct jtag_tap *tap)
        free(tap);
 }
 
-int jtag_interface_init(struct command_context_s *cmd_ctx)
+int jtag_interface_init(struct command_context *cmd_ctx)
 {
        if (jtag)
                return ERROR_OK;
@@ -1375,7 +1375,7 @@ int jtag_interface_init(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-int jtag_init_inner(struct command_context_s *cmd_ctx)
+int jtag_init_inner(struct command_context *cmd_ctx)
 {
        struct jtag_tap *tap;
        int retval;
@@ -1461,7 +1461,7 @@ int jtag_interface_quit(void)
 }
 
 
-int jtag_init_reset(struct command_context_s *cmd_ctx)
+int jtag_init_reset(struct command_context *cmd_ctx)
 {
        int retval;
 
@@ -1515,7 +1515,7 @@ int jtag_init_reset(struct command_context_s *cmd_ctx)
        return jtag_init_inner(cmd_ctx);
 }
 
-int jtag_init(struct command_context_s *cmd_ctx)
+int jtag_init(struct command_context *cmd_ctx)
 {
        int retval;
 
index ce3cca355d20bd6dd6e82374a24e0a4ba1bdcfb4..324ea7e94409de98d1fc30b1eb3e00d967e24180 100644 (file)
@@ -36,7 +36,7 @@ static uint32_t dummy_data;
 
 
 static int dummy_speed(int speed);
-static int dummy_register_commands(struct command_context_s *cmd_ctx);
+static int dummy_register_commands(struct command_context *cmd_ctx);
 static int dummy_init(void);
 static int dummy_quit(void);
 static int dummy_khz(int khz, int *jtag_speed);
@@ -161,7 +161,7 @@ static int dummy_speed(int speed)
        return ERROR_OK;
 }
 
-static int dummy_register_commands(struct command_context_s *cmd_ctx)
+static int dummy_register_commands(struct command_context *cmd_ctx)
 {
        return ERROR_OK;
 }
index 6ae823e82652bf00dce016be0e5f10784e818e3f..c679b2164344f7c9ce5334a9049c6e01a3add4be 100644 (file)
@@ -47,7 +47,7 @@ static void ep93xx_write(int tck, int tms, int tdi);
 static void ep93xx_reset(int trst, int srst);
 
 static int ep93xx_speed(int speed);
-static int ep93xx_register_commands(struct command_context_s *cmd_ctx);
+static int ep93xx_register_commands(struct command_context *cmd_ctx);
 static int ep93xx_init(void);
 static int ep93xx_quit(void);
 
@@ -122,7 +122,7 @@ static int ep93xx_speed(int speed)
        return ERROR_OK;
 }
 
-static int ep93xx_register_commands(struct command_context_s *cmd_ctx)
+static int ep93xx_register_commands(struct command_context *cmd_ctx)
 {
 
        return ERROR_OK;
index 3e7dd2a2d6d877e5319b03a4779eb126f1dae7cb..7d7a53837901bd88c030e3252b72a97841c21449 100644 (file)
@@ -3969,7 +3969,7 @@ static void ktlink_blink(void)
        buffer_write(high_direction);
 }
 
-static int ft2232_register_commands(struct command_context_s* cmd_ctx)
+static int ft2232_register_commands(struct command_context* cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "ft2232_device_desc",
                        ft2232_handle_device_desc_command, COMMAND_CONFIG,
index 1c5f65408e1047156ca5fbf00bd19b5af20d4bf7..e24c23a69b969ade9ffe355cd4460d324f94855e 100644 (file)
@@ -562,7 +562,7 @@ COMMAND_HANDLER(gw16012_handle_parport_port_command)
        return ERROR_OK;
 }
 
-static int gw16012_register_commands(struct command_context_s *cmd_ctx)
+static int gw16012_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "parport_port",
                        gw16012_handle_parport_port_command, COMMAND_CONFIG,
index 5727298513b1cbd65a2ef6a4acfe77c57df5048a..05e4048b1d3f06f86359745e902392013ee060e2 100644 (file)
@@ -207,7 +207,7 @@ struct jtag_interface {
         * @param cmd_ctx The context in which commands should be registered.
         * @returns ERROR_OK on success, or an error code on failure.
         */
-       int (*register_commands)(struct command_context_s* cmd_ctx);
+       int (*register_commands)(struct command_context* cmd_ctx);
 
        /**
         * Interface driver must initalize any resources and connect to a
index 9677f0e80d54ade44c075a45188a78e7c5081895..27d400d4d58bedb30ce73b757109c96ce16681bd 100644 (file)
@@ -87,13 +87,13 @@ static int jlink_execute_queue(void);
 static int jlink_speed(int speed);
 static int jlink_speed_div(int speed, int* khz);
 static int jlink_khz(int khz, int *jtag_speed);
-static int jlink_register_commands(struct command_context_s *cmd_ctx);
+static int jlink_register_commands(struct command_context *cmd_ctx);
 static int jlink_init(void);
 static int jlink_quit(void);
 
 /* CLI command handler functions */
-static int jlink_handle_jlink_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-static int jlink_handle_jlink_hw_jtag_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+static int jlink_handle_jlink_info_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc);
+static int jlink_handle_jlink_hw_jtag_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc);
 
 /* Queue command functions */
 static void jlink_end_state(tap_state_t state);
@@ -290,7 +290,7 @@ static int jlink_khz(int khz, int *jtag_speed)
        return ERROR_OK;
 }
 
-static int jlink_register_commands(struct command_context_s *cmd_ctx)
+static int jlink_register_commands(struct command_context *cmd_ctx)
 {
 
        register_command(cmd_ctx, NULL, "jlink_info",
@@ -630,7 +630,7 @@ static int jlink_get_version_info(void)
        return ERROR_OK;
 }
 
-static int jlink_handle_jlink_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int jlink_handle_jlink_info_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc)
 {
        if (jlink_get_version_info() == ERROR_OK)
        {
@@ -641,7 +641,7 @@ static int jlink_handle_jlink_info_command(struct command_context_s *cmd_ctx, ch
        return ERROR_OK;
 }
 
-static int jlink_handle_jlink_hw_jtag_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int jlink_handle_jlink_hw_jtag_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc)
 {
        switch (argc) {
        case 0:
index e3f81489682ec7de27639f1444732d2a4531b036..30d62fd92791c5c96685a32ef9dced21c32090a4 100644 (file)
@@ -315,7 +315,7 @@ bool jtag_will_verify_capture_ir(void);
  * Initialize interface upon startup.  Return a successful no-op upon
  * subsequent invocations.
  */
-int  jtag_interface_init(struct command_context_s* cmd_ctx);
+int  jtag_interface_init(struct command_context* cmd_ctx);
 
 /// Shutdown the JTAG interface upon program exit.
 int  jtag_interface_quit(void);
@@ -324,12 +324,12 @@ int  jtag_interface_quit(void);
  * Initialize JTAG chain using only a RESET reset. If init fails,
  * try reset + init.
  */
-int  jtag_init(struct command_context_s* cmd_ctx);
+int  jtag_init(struct command_context* cmd_ctx);
 
 /// reset, then initialize JTAG chain
-int jtag_init_reset(struct command_context_s* cmd_ctx);
-int jtag_register_commands(struct command_context_s* cmd_ctx);
-int jtag_init_inner(struct command_context_s *cmd_ctx);
+int jtag_init_reset(struct command_context* cmd_ctx);
+int jtag_register_commands(struct command_context* cmd_ctx);
+int jtag_init_inner(struct command_context *cmd_ctx);
 
 /**
  * @file
index b9396a992691db1416e965b20b38e26f49b56d76..399c00ad04d74978fc05c32dfc61776add37be17 100644 (file)
@@ -485,7 +485,7 @@ COMMAND_HANDLER(parport_handle_parport_toggling_time_command)
        return ERROR_OK;
 }
 
-static int parport_register_commands(struct command_context_s *cmd_ctx)
+static int parport_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "parport_port",
                        parport_handle_parport_port_command, COMMAND_CONFIG,
index 154e3e1758df1048df362e5ce96fb2a60bc1874b..b4ba3f44aa4e251af640dc341b14fa75e1a69162 100644 (file)
@@ -42,7 +42,7 @@
 static int presto_jtag_speed(int speed);
 static int presto_jtag_khz(int khz, int *jtag_speed);
 static int presto_jtag_speed_div(int speed, int *khz);
-static int presto_jtag_register_commands(struct command_context_s *cmd_ctx);
+static int presto_jtag_register_commands(struct command_context *cmd_ctx);
 static int presto_jtag_init(void);
 static int presto_jtag_quit(void);
 
@@ -766,7 +766,7 @@ COMMAND_HANDLER(presto_handle_serial_command)
        return ERROR_OK;
 }
 
-static int presto_jtag_register_commands(struct command_context_s *cmd_ctx)
+static int presto_jtag_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "presto_serial", presto_handle_serial_command,
                COMMAND_CONFIG, NULL);
index 9dd8b888ad96bbab09ecc4f256ebeb3bb036692a..8f2f26fe65d8d9d0edc752b332bab90a567332f1 100644 (file)
@@ -1574,7 +1574,7 @@ int rlink_khz(
 static
 int
 handle_dtc_directory_command(
-       struct command_context_s *cmd_ctx,
+       struct command_context *cmd_ctx,
        char *cmd,
        char **args,
        int argc
@@ -1592,7 +1592,7 @@ handle_dtc_directory_command(
 
 
 static
-int rlink_register_commands(struct command_context_s *cmd_ctx)
+int rlink_register_commands(struct command_context *cmd_ctx)
 {
 
 #ifdef _DEBUG_JTAG_IO_
index 9d6169ccfe7c0e8fb9bd042adacd88e7bf99088b..75732ef0d786d73a589acc63c3084fb4cf89b06d 100644 (file)
@@ -373,7 +373,7 @@ static int jim_jtag_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        int e;
        Jim_Nvp *n;
        Jim_Obj *o;
-       struct command_context_s *context;
+       struct command_context *context;
 
        enum {
                JTAG_CMD_INTERFACE,
@@ -1416,7 +1416,7 @@ COMMAND_HANDLER(handle_tms_sequence_command)
        return ERROR_OK;
 }
 
-int jtag_register_commands(struct command_context_s *cmd_ctx)
+int jtag_register_commands(struct command_context *cmd_ctx)
 {
        register_jim(cmd_ctx, "jtag", jim_jtag_command,
                        "perform jtag tap actions");
index 7abb0ca330908081645cda0be67ca0e829c1ba73..10dfe0619fc42b579e840011895f7ea2fab4349a 100644 (file)
@@ -51,7 +51,7 @@
 
 static int usbprog_execute_queue(void);
 static int usbprog_speed(int speed);
-static int usbprog_register_commands(struct command_context_s *cmd_ctx);
+static int usbprog_register_commands(struct command_context *cmd_ctx);
 static int usbprog_init(void);
 static int usbprog_quit(void);
 
@@ -120,7 +120,7 @@ static int usbprog_speed(int speed)
        return ERROR_OK;
 }
 
-static int usbprog_register_commands(struct command_context_s *cmd_ctx)
+static int usbprog_register_commands(struct command_context *cmd_ctx)
 {
        return ERROR_OK;
 }
index c404476fbf156955e97a15049b18716f11f81cfc..0684dd3bb79415f32ac9ec29b6f92697d428c0cd 100644 (file)
@@ -1880,7 +1880,7 @@ static void vsllink_debug_buffer(uint8_t *buffer, int length)
 }
 #endif // _DEBUG_USB_COMMS_ || _DEBUG_JTAG_IO_
 
-static int vsllink_register_commands(struct command_context_s *cmd_ctx)
+static int vsllink_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "vsllink_usb_vid",
                        vsllink_handle_usb_vid_command, COMMAND_CONFIG,
index 8f4d5e5fdf711c1996d8cda443997cc842dea2e4..1edf57f8ea2eda4171b1e9caade039c65708e7a9 100644 (file)
@@ -40,12 +40,12 @@ void zy1000_reset(int trst, int srst);
 
 
 int zy1000_speed(int speed);
-int zy1000_register_commands(struct command_context_s *cmd_ctx);
+int zy1000_register_commands(struct command_context *cmd_ctx);
 int zy1000_init(void);
 int zy1000_quit(void);
 
 /* interface commands */
-int zy1000_handle_zy1000_port_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
+int zy1000_handle_zy1000_port_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc);
 
 static int zy1000_khz(int khz, int *jtag_speed)
 {
@@ -225,7 +225,7 @@ static void setPower(bool power)
        }
 }
 
-int handle_power_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+int handle_power_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc)
 {
        if (argc > 1)
        {
@@ -354,7 +354,7 @@ zylinjtag_Jim_Command_powerstatus(Jim_Interp *interp,
        return JIM_OK;
 }
 
-int zy1000_register_commands(struct command_context_s *cmd_ctx)
+int zy1000_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "power", handle_power_command, COMMAND_ANY,
                        "power <on/off> - turn power switch to target on/off. No arguments - print status.");
index 8c99af07c475591805d291abca20cb157bf7ea59..78f220c7d3107fa8803fef9f5f2f2a2652789e4d 100644 (file)
@@ -106,7 +106,7 @@ static int log_target_callback_event_handler(struct target *target, enum target_
        return ERROR_OK;
 }
 
-int ioutil_init(struct command_context_s *cmd_ctx);
+int ioutil_init(struct command_context *cmd_ctx);
 
 /* OpenOCD can't really handle failure of this command. Patches welcome! :-) */
 COMMAND_HANDLER(handle_init_command)
@@ -175,15 +175,15 @@ COMMAND_HANDLER(handle_init_command)
        return ERROR_OK;
 }
 
-command_context_t *global_cmd_ctx;
+struct command_context *global_cmd_ctx;
 
 /// src/hello.c gives a simple example for writing new command modules
-int hello_register_commands(struct command_context_s *cmd_ctx);
+int hello_register_commands(struct command_context *cmd_ctx);
 
 /* NB! this fn can be invoked outside this file for non PC hosted builds */
-command_context_t *setup_command_handler(void)
+struct command_context *setup_command_handler(void)
 {
-       command_context_t *cmd_ctx;
+       struct command_context *cmd_ctx;
 
        global_cmd_ctx = cmd_ctx = command_init();
 
@@ -246,7 +246,7 @@ int openocd_main(int argc, char *argv[])
        int ret;
 
        /* initialize commandline interface */
-       command_context_t *cmd_ctx;
+       struct command_context *cmd_ctx;
 
        cmd_ctx = setup_command_handler();
 
index e0a7eac596d9f7b2b1de37ccf441c877da302bb7..f5f3303a5a5b280aa30217ef6b73f58af64b47b5 100644 (file)
@@ -184,7 +184,7 @@ COMMAND_HANDLER(handle_pld_load_command)
        return ERROR_OK;
 }
 
-int pld_init(struct command_context_s *cmd_ctx)
+int pld_init(struct command_context *cmd_ctx)
 {
        if (!pld_devices)
                return ERROR_OK;
@@ -199,7 +199,7 @@ int pld_init(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-int pld_register_commands(struct command_context_s *cmd_ctx)
+int pld_register_commands(struct command_context *cmd_ctx)
 {
        pld_cmd = register_command(cmd_ctx, NULL, "pld", NULL, COMMAND_ANY, "programmable logic device commands");
 
index 4c4c64a77649fc02884adbfbb6827b2c2d8e8334..b183e3e052c4ca12cda5bc5f5e71ff15ac66f6be 100644 (file)
@@ -31,7 +31,7 @@ struct pld_driver
 {
        char *name;
        __PLD_DEVICE_COMMAND((*pld_device_command));
-       int (*register_commands)(struct command_context_s *cmd_ctx);
+       int (*register_commands)(struct command_context *cmd_ctx);
        int (*load)(struct pld_device *pld_device, const char *filename);
 };
 
@@ -44,9 +44,9 @@ struct pld_device
        struct pld_device *next;
 };
 
-int pld_register_commands(struct command_context_s *cmd_ctx);
+int pld_register_commands(struct command_context *cmd_ctx);
 
-int pld_init(struct command_context_s *cmd_ctx);
+int pld_init(struct command_context *cmd_ctx);
 
 struct pld_device *get_pld_device_by_num(int num);
 
index e2ebb04143ec4b9a63b2d74c6586747d064bf447..24bcd3481cb2e54039e81bb412eb629ca1b7c20e 100644 (file)
@@ -233,7 +233,7 @@ PLD_DEVICE_COMMAND_HANDLER(virtex2_pld_device_command)
        return ERROR_OK;
 }
 
-static int virtex2_register_commands(struct command_context_s *cmd_ctx)
+static int virtex2_register_commands(struct command_context *cmd_ctx)
 {
        command_t *virtex2_cmd = register_command(cmd_ctx, NULL, "virtex2",
                        NULL, COMMAND_ANY, "virtex2 specific commands");
index f49f352fe041fd99ddf4455cf99b94a66ba790ad..4151ec7932bd0a563ed584e94c25861b4ef45a4d 100644 (file)
@@ -650,7 +650,7 @@ int gdb_output_con(struct connection *connection, const char* line)
        return retval;
 }
 
-int gdb_output(struct command_context_s *context, const char* line)
+int gdb_output(struct command_context *context, const char* line)
 {
        /* this will be dumped to the log and also sent as an O packet if possible */
        LOG_USER_N("%s", line);
@@ -1556,7 +1556,7 @@ static int compare_bank (const void * a, const void * b)
 
 int gdb_query_packet(struct connection *connection, struct target *target, char *packet, int packet_size)
 {
-       command_context_t *cmd_ctx = connection->cmd_ctx;
+       struct command_context *cmd_ctx = connection->cmd_ctx;
        struct gdb_connection *gdb_connection = connection->priv;
 
        if (strstr(packet, "qRcmd,"))
@@ -2371,7 +2371,7 @@ COMMAND_HANDLER(handle_gdb_breakpoint_override_command)
        return ERROR_OK;
 }
 
-int gdb_register_commands(command_context_t *command_context)
+int gdb_register_commands(struct command_context *command_context)
 {
        register_command(command_context, NULL, "gdb_sync",
                        handle_gdb_sync_command, COMMAND_ANY,
index de84e200a72f3256e74f4d8098038b95c6336aa4..4513e8a06adfdb0fa28ba9055fc52da6ed6eae48 100644 (file)
@@ -55,7 +55,7 @@ struct gdb_service
 };
 
 int gdb_init(void);
-int gdb_register_commands(command_context_t *command_context);
+int gdb_register_commands(struct command_context *command_context);
 
 #define ERROR_GDB_BUFFER_TOO_SMALL (-800)
 #define ERROR_GDB_TIMEOUT (-801)
index 5614ef98682a60b20111aa43056018b0f60c0c49..7416784c768b18bc1adec1cb3263b72600c0a702 100644 (file)
@@ -45,7 +45,7 @@ static int shutdown_openocd = 0;
 /* set when using pipes rather than tcp */
 int server_use_pipes = 0;
 
-int add_connection(struct service *service, command_context_t *cmd_ctx)
+int add_connection(struct service *service, struct command_context *cmd_ctx)
 {
        socklen_t address_size;
        struct connection *c, **p;
@@ -288,7 +288,7 @@ int remove_services(void)
 extern void openocd_sleep_prelude(void);
 extern void openocd_sleep_postlude(void);
 
-int server_loop(command_context_t *command_context)
+int server_loop(struct command_context *command_context)
 {
        struct service *service;
 
@@ -541,7 +541,7 @@ COMMAND_HANDLER(handle_shutdown_command)
        return ERROR_COMMAND_CLOSE_CONNECTION;
 }
 
-int server_register_commands(command_context_t *context)
+int server_register_commands(struct command_context *context)
 {
        register_command(context, NULL, "shutdown",
                        handle_shutdown_command, COMMAND_ANY,
index 062691b0a2c5be1df5ad854f8e26b7c9944c2f91..5e862815bb1eadd465b4647e50b1df355f557747 100644 (file)
@@ -42,7 +42,7 @@ struct connection
 {
        int fd;
        struct sockaddr_in sin;
-       command_context_t *cmd_ctx;
+       struct command_context *cmd_ctx;
        struct service *service;
        int input_pending;
        void *priv;
@@ -77,9 +77,9 @@ int add_service(char *name, enum connection_type type, unsigned short port,
 int server_init(void);
 int server_quit(void);
 
-int server_loop(command_context_t *command_context);
+int server_loop(struct command_context *command_context);
 
-int server_register_commands(command_context_t *context);
+int server_register_commands(struct command_context *context);
 
 /**
  * Defines an extended command handler function declaration to enable
index eed483ca2c9901192d811d7449094cb41fc03aed..40a0428d7a8dbac2eabd87b96a0899757caabcc2 100644 (file)
@@ -175,7 +175,7 @@ COMMAND_HANDLER(handle_tcl_port_command)
        return CALL_COMMAND_HANDLER(server_port_command, &tcl_port);
 }
 
-int tcl_register_commands(command_context_t *cmd_ctx)
+int tcl_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "tcl_port",
                        handle_tcl_port_command, COMMAND_CONFIG,
index d6c9e10b1cabd5356d8111a231fc2f6e4ffedec3..1f6ba62e07d42efb007c9a67e91a7a450ad2159c 100644 (file)
@@ -23,6 +23,6 @@
 #include "server.h"
 
 int tcl_init(void);
-int tcl_register_commands(command_context_t *cmd_ctx);
+int tcl_register_commands(struct command_context *cmd_ctx);
 
 #endif /* _TCL_SERVER_H_ */
index 93028b14dbd29314bfe734adb6fc4b5f3b9fb8e6..46d438e0ab2d3ec62f3063a10274a931de413128 100644 (file)
@@ -94,7 +94,7 @@ int telnet_outputline(struct connection *connection, const char *line)
        return ERROR_OK;
 }
 
-int telnet_output(struct command_context_s *cmd_ctx, const char* line)
+int telnet_output(struct command_context *cmd_ctx, const char* line)
 {
        struct connection *connection = cmd_ctx->output_handler_priv;
 
@@ -198,7 +198,7 @@ int telnet_input(struct connection *connection)
        char buffer[TELNET_BUFFER_SIZE];
        char *buf_p;
        struct telnet_connection *t_con = connection->priv;
-       command_context_t *command_context = connection->cmd_ctx;
+       struct command_context *command_context = connection->cmd_ctx;
 
        bytes_read = read_socket(connection->fd, buffer, TELNET_BUFFER_SIZE);
 
@@ -616,7 +616,7 @@ COMMAND_HANDLER(handle_exit_command)
        return ERROR_COMMAND_CLOSE_CONNECTION;
 }
 
-int telnet_register_commands(command_context_t *command_context)
+int telnet_register_commands(struct command_context *command_context)
 {
        register_command(command_context, NULL, "exit",
                        &handle_exit_command, COMMAND_EXEC,
index c45a42363f6afb347074600a5dda271f5a7f656b..7e398222076a7a1de4965f9cd13cda3841cbfec8 100644 (file)
@@ -69,6 +69,6 @@ struct telnet_service
 };
 
 int telnet_init(char *banner);
-int telnet_register_commands(command_context_t *command_context);
+int telnet_register_commands(struct command_context *command_context);
 
 #endif /* TELNET_SERVER_H */
index 7e689fa3cccac6cddc42fc29f1b4f3ff282237ae..814f3f22b8621e41afa6dd9eb54b56c3a221d893 100644 (file)
@@ -209,7 +209,7 @@ static int svf_check_tdo_para_index = 0;
 static int svf_read_command_from_file(int fd);
 static int svf_check_tdo(void);
 static int svf_add_check_para(uint8_t enabled, int buffer_offset, int bit_len);
-static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str);
+static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str);
 
 static int svf_fd = 0;
 static char *svf_command_buffer = NULL;
@@ -750,7 +750,7 @@ static int svf_execute_tap(void)
        return ERROR_OK;
 }
 
-static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str)
+static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str)
 {
        char *argus[256], command;
        int num_of_argu = 0, i;
@@ -1460,7 +1460,7 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str)
        return ERROR_OK;
 }
 
-int svf_register_commands(struct command_context_s *cmd_ctx)
+int svf_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "svf",
                        &handle_svf_command, COMMAND_EXEC,
index 329fea93b1a9f4d2337554a0858d56862f39c20b..20a355502ae5f024e812469e860d54a5fbe04b18 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "command.h"
 
-int svf_register_commands(struct command_context_s *cmd_ctx);
+int svf_register_commands(struct command_context *cmd_ctx);
 
 /**
  * svf_add_statemove() moves from the current state to @a goal_state.
index 970ffa2c2160f25518037e89f26ad7f51c96f9ff..feaa17b66124677dd7e75139845d1950cfbfed73 100644 (file)
@@ -1801,7 +1801,7 @@ static int arm11_target_create(struct target *target, Jim_Interp *interp)
        return ERROR_OK;
 }
 
-static int arm11_init_target(struct command_context_s *cmd_ctx,
+static int arm11_init_target(struct command_context *cmd_ctx,
                struct target *target)
 {
        /* Initialize anything we can set up without talking to the target */
@@ -2239,7 +2239,7 @@ struct target_type arm11_target = {
        };
 
 
-int arm11_register_commands(struct command_context_s *cmd_ctx)
+int arm11_register_commands(struct command_context *cmd_ctx)
 {
        FNC_INFO;
 
index ae6a93ca84a54fb2dba5eb4943c9d7eb203c1fe6..f890253ac60fe301d53d6a9270b840ec7c98cc43 100644 (file)
@@ -182,7 +182,7 @@ struct arm11_reg_state
        struct target *                 target;
 };
 
-int arm11_register_commands(struct command_context_s *cmd_ctx);
+int arm11_register_commands(struct command_context *cmd_ctx);
 
 int arm11_read_etm(struct arm11_common * arm11, uint8_t address, uint32_t *value);
 int arm11_write_etm(struct arm11_common * arm11, uint8_t address, uint32_t value);
index ad4b12e0ba676e508f78ad5a438ba428e5b35f45..bdbc8dd3d85ab6348e9963c9cee6aed1584ffac0 100644 (file)
@@ -211,7 +211,7 @@ static void arm720t_pre_restore_context(struct target *target)
        arm720t_write_cp15(target, 0xee060f10, arm720t->far_reg);
 }
 
-static int arm720t_verify_pointer(struct command_context_s *cmd_ctx,
+static int arm720t_verify_pointer(struct command_context *cmd_ctx,
                struct arm720t_common *arm720t)
 {
        if (arm720t->common_magic != ARM720T_COMMON_MAGIC) {
@@ -371,7 +371,7 @@ static int arm720t_soft_reset_halt(struct target *target)
        return ERROR_OK;
 }
 
-static int arm720t_init_target(struct command_context_s *cmd_ctx, struct target *target)
+static int arm720t_init_target(struct command_context *cmd_ctx, struct target *target)
 {
        return arm7tdmi_init_target(cmd_ctx, target);
 }
@@ -490,7 +490,7 @@ static int arm720t_mcr(struct target *target, int cpnum, uint32_t op1, uint32_t
        return arm720t_write_cp15(target, mrc_opcode(cpnum, op1, op2, CRn, CRm), value);
 }
 
-static int arm720t_register_commands(struct command_context_s *cmd_ctx)
+static int arm720t_register_commands(struct command_context *cmd_ctx)
 {
        int retval;
        command_t *arm720t_cmd;
index 2d3fe15da3d71eb127acdf3acf799474ebec6d5c..87a643455d3df107ddd9226fa99d35c89d938893 100644 (file)
@@ -3119,7 +3119,7 @@ int arm7_9_init_arch_info(struct target *target, struct arm7_9_common *arm7_9)
                        1, 1, target);
 }
 
-int arm7_9_register_commands(struct command_context_s *cmd_ctx)
+int arm7_9_register_commands(struct command_context *cmd_ctx)
 {
        command_t *arm7_9_cmd;
 
index 2c50b7178e321f7a4b2e929788c82fad273d08b6..035c5fe3ab8480f01e213ebafb0e8858eef0d898 100644 (file)
@@ -115,7 +115,7 @@ target_to_arm7_9(struct target *target)
                        armv4_5_common);
 }
 
-int arm7_9_register_commands(struct command_context_s *cmd_ctx);
+int arm7_9_register_commands(struct command_context *cmd_ctx);
 
 int arm7_9_poll(struct target *target);
 
index c4cda7de1780b66e763c7d6d69e10be6488bb372..029dce1c3db6259f372f6ef9f98340bf4cf1d282 100644 (file)
@@ -684,7 +684,7 @@ int arm7tdmi_examine(struct target *target)
        return ERROR_OK;
 }
 
-int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target *target)
+int arm7tdmi_init_target(struct command_context *cmd_ctx, struct target *target)
 {
        arm7tdmi_build_reg_cache(target);
 
index 4a0a1ed903baf44eeb846a8101fed70d1353750e..85b64befa9dbd2f75748d69813f4ef84dc48200b 100644 (file)
@@ -34,7 +34,7 @@ struct arm7tdmi_common
 };
 
 int arm7tdmi_init_arch_info(struct target *target, struct arm7tdmi_common *arm7tdmi, struct jtag_tap *tap);
-int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target *target);
+int arm7tdmi_init_target(struct command_context *cmd_ctx, struct target *target);
 int arm7tdmi_examine(struct target *target);
 
 #endif /* ARM7TDMI_H */
index 577bf26e8ece1ec5f930a809676351e62fd8f5d9..cd63d7bdd517ee5c02c2cdae3be0203df41c5a09 100644 (file)
@@ -415,7 +415,7 @@ void arm920t_pre_restore_context(struct target *target)
 
 static const char arm920_not[] = "target is not an ARM920";
 
-static int arm920t_verify_pointer(struct command_context_s *cmd_ctx,
+static int arm920t_verify_pointer(struct command_context *cmd_ctx,
                struct arm920t_common *arm920t)
 {
        if (arm920t->common_magic != ARM920T_COMMON_MAGIC) {
@@ -1348,7 +1348,7 @@ static int arm920t_mcr(struct target *target, int cpnum, uint32_t op1, uint32_t
 }
 
 /** Registers commands to access coprocessor, cache, and MMU resources. */
-int arm920t_register_commands(struct command_context_s *cmd_ctx)
+int arm920t_register_commands(struct command_context *cmd_ctx)
 {
        int retval;
        command_t *arm920t_cmd;
index 02f6da5c6de030354e6b7e79f657102b88c6fac8..567c8def67a4c794562cbbb3cdbed60096770dc7 100644 (file)
@@ -71,6 +71,6 @@ void arm920t_disable_mmu_caches(struct target *target,
        int mmu, int d_u_cache, int i_cache);
 void arm920t_enable_mmu_caches(struct target *target,
        int mmu, int d_u_cache, int i_cache);
-int arm920t_register_commands(struct command_context_s *cmd_ctx);
+int arm920t_register_commands(struct command_context *cmd_ctx);
 
 #endif /* ARM920T_H */
index b2f246f90f6a36b2d6dad86d78508a8b8c23b16c..47a20cb109042b39dac1360b65905a728bf6d27c 100644 (file)
@@ -474,7 +474,7 @@ static void arm926ejs_pre_restore_context(struct target *target)
 
 static const char arm926_not[] = "target is not an ARM926";
 
-static int arm926ejs_verify_pointer(struct command_context_s *cmd_ctx,
+static int arm926ejs_verify_pointer(struct command_context *cmd_ctx,
                struct arm926ejs_common *arm926)
 {
        if (arm926->common_magic != ARM926EJS_COMMON_MAGIC) {
@@ -818,7 +818,7 @@ static int arm926ejs_mmu(struct target *target, int *enabled)
 }
 
 /** Registers commands to access coprocessor, cache, and debug resources.  */
-int arm926ejs_register_commands(struct command_context_s *cmd_ctx)
+int arm926ejs_register_commands(struct command_context *cmd_ctx)
 {
        int retval;
        command_t *arm926ejs_cmd;
index e6c46dc0c30d8e56bdbc3cd64ade702b8c46c808..22081f4e63511660aecab08f82d2d4d27a737ad3 100644 (file)
@@ -48,7 +48,7 @@ target_to_arm926(struct target *target)
 
 int arm926ejs_init_arch_info(struct target *target,
                struct arm926ejs_common *arm926ejs, struct jtag_tap *tap);
-int arm926ejs_register_commands(struct command_context_s *cmd_ctx);
+int arm926ejs_register_commands(struct command_context *cmd_ctx);
 int arm926ejs_arch_state(struct target *target);
 int arm926ejs_write_memory(struct target *target,
                uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
index b1ae48c359a84714508e75560593a6ab46bf89ff..6db7d79bf47207f33af26366f3a6c7a66b304d85 100644 (file)
@@ -57,7 +57,7 @@ static int arm966e_target_create(struct target *target, Jim_Interp *interp)
        return arm966e_init_arch_info(target, arm966e, target->tap);
 }
 
-static int arm966e_verify_pointer(struct command_context_s *cmd_ctx,
+static int arm966e_verify_pointer(struct command_context *cmd_ctx,
                struct arm966e_common *arm966e)
 {
        if (arm966e->common_magic != ARM966E_COMMON_MAGIC) {
@@ -216,7 +216,7 @@ COMMAND_HANDLER(arm966e_handle_cp15_command)
 }
 
 /** Registers commands used to access coprocessor resources. */
-int arm966e_register_commands(struct command_context_s *cmd_ctx)
+int arm966e_register_commands(struct command_context *cmd_ctx)
 {
        int retval;
        command_t *arm966e_cmd;
index 74e1a0308f4ce9f1fcdf981b3a9bf5bfc005f809..b58f3a241337caf986b25d510b0d8741c4dd3ac9 100644 (file)
@@ -43,7 +43,7 @@ target_to_arm966(struct target *target)
 
 int arm966e_init_arch_info(struct target *target,
                struct arm966e_common *arm966e, struct jtag_tap *tap);
-int arm966e_register_commands(struct command_context_s *cmd_ctx);
+int arm966e_register_commands(struct command_context *cmd_ctx);
 int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value);
 
 #endif /* ARM966E_H */
index 5425582d5aa108bd454d588b530b24e9d599c790..b910447f10d1a5fd7fa57c377b10ef571b0448d5 100644 (file)
@@ -779,7 +779,7 @@ int arm9tdmi_examine(struct target *target)
        return ERROR_OK;
 }
 
-int arm9tdmi_init_target(struct command_context_s *cmd_ctx,
+int arm9tdmi_init_target(struct command_context *cmd_ctx,
                struct target *target)
 {
        arm9tdmi_build_reg_cache(target);
@@ -936,7 +936,7 @@ COMMAND_HANDLER(handle_arm9tdmi_catch_vectors_command)
        return ERROR_OK;
 }
 
-int arm9tdmi_register_commands(struct command_context_s *cmd_ctx)
+int arm9tdmi_register_commands(struct command_context *cmd_ctx)
 {
        int retval;
        command_t *arm9tdmi_cmd;
index 5165dc88bcd752e7c4979818fe2bcf84c02b56dc..34a63ee72961b7524e03d03b31df6edfa34b70ec 100644 (file)
@@ -51,12 +51,12 @@ enum arm9tdmi_vector_bit
        ARM9TDMI_FIQ_VECTOR = 0x80,
 };
 
-int arm9tdmi_init_target(struct command_context_s *cmd_ctx,
+int arm9tdmi_init_target(struct command_context *cmd_ctx,
                struct target *target);
 int arm9tdmi_examine(struct target *target);
 int arm9tdmi_init_arch_info(struct target *target,
                struct arm9tdmi_common *arm9tdmi, struct jtag_tap *tap);
-int arm9tdmi_register_commands(struct command_context_s *cmd_ctx);
+int arm9tdmi_register_commands(struct command_context *cmd_ctx);
 
 int arm9tdmi_clock_out(struct arm_jtag *jtag_info,
                uint32_t instr, uint32_t out, uint32_t *in, int sysspeed);
index 751020fbc8e72f28dfb468775e80dd1ecc32f047..958844bb00bda1efde006ed27fd4dcc98c05d760 100644 (file)
@@ -1022,7 +1022,7 @@ is_dap_cid_ok(uint32_t cid3, uint32_t cid2, uint32_t cid1, uint32_t cid0)
                        && ((cid1 & 0x0f) == 0) && cid0 == 0x0d;
 }
 
-int dap_info_command(struct command_context_s *cmd_ctx, struct swjdp_common *swjdp, int apsel)
+int dap_info_command(struct command_context *cmd_ctx, struct swjdp_common *swjdp, int apsel)
 {
 
        uint32_t dbgbase,apid;
index 486d29f407f0d9c829ffb680d578e9a4b98e4832..56b6206da9619a1e02a2fd7e7e067721bc7378b7 100644 (file)
@@ -156,7 +156,7 @@ int ahbap_debugport_init(struct swjdp_common *swjdp);
 
 
 /* Commands for user dap access */
-int dap_info_command(struct command_context_s *cmd_ctx,
+int dap_info_command(struct command_context *cmd_ctx,
                struct swjdp_common *swjdp, int apsel);
 
 #define DAP_COMMAND_HANDLER(name) \
index 097e6e73adf4a40e5dadeb3055d73bf80ae5e18e..f7d5d16c3ac97d9c038d9192e4818bdb0f0ec950 100644 (file)
@@ -462,7 +462,7 @@ usage:
        return ERROR_OK;
 }
 
-int armv4_5_register_commands(struct command_context_s *cmd_ctx)
+int armv4_5_register_commands(struct command_context *cmd_ctx)
 {
        command_t *armv4_5_cmd;
 
index 472c2c1ba97447b65200af82fc7a92e85a354bd8..14dfa99e678a520f6f42b42182e760a05b6010e8 100644 (file)
@@ -179,7 +179,7 @@ int armv4_5_arch_state(struct target *target);
 int armv4_5_get_gdb_reg_list(struct target *target,
                struct reg **reg_list[], int *reg_list_size);
 
-int armv4_5_register_commands(struct command_context_s *cmd_ctx);
+int armv4_5_register_commands(struct command_context *cmd_ctx);
 int armv4_5_init_arch_info(struct target *target, struct arm *armv4_5);
 
 int armv4_5_run_algorithm(struct target *target,
index 793979e51d99cc3108032e0cd7a061f36569fadd..58fc0c1d52c09a6e36631947e8619b251135ae4c 100644 (file)
@@ -87,7 +87,7 @@ int armv4_5_identify_cache(uint32_t cache_type_reg, struct armv4_5_cache_common
        return ERROR_OK;
 }
 
-int armv4_5_handle_cache_info_command(struct command_context_s *cmd_ctx, struct armv4_5_cache_common *armv4_5_cache)
+int armv4_5_handle_cache_info_command(struct command_context *cmd_ctx, struct armv4_5_cache_common *armv4_5_cache)
 {
        if (armv4_5_cache->ctype == -1)
        {
index 456a32d3711b6791e33062fe48490c45cebebd59..1a82b671cee2ec435889a85bfeb3401996c0b9ca 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "types.h"
 
-struct command_context_s;
+struct command_context;
 
 struct armv4_5_cachesize
 {
@@ -47,7 +47,7 @@ int armv4_5_identify_cache(uint32_t cache_type_reg,
 int armv4_5_cache_state(uint32_t cp15_control_reg,
                struct armv4_5_cache_common *cache);
 
-int armv4_5_handle_cache_info_command(struct command_context_s *cmd_ctx,
+int armv4_5_handle_cache_info_command(struct command_context *cmd_ctx,
                struct armv4_5_cache_common *armv4_5_cache);
 
 enum
index 9227219b67099ce99761799350c0d39288faaaa7..e40e8fdcff44e2670a6a5f5fcd5b7d367c115150 100644 (file)
@@ -361,7 +361,7 @@ usage:
        return ERROR_OK;
 }
 
-int armv7a_register_commands(struct command_context_s *cmd_ctx)
+int armv7a_register_commands(struct command_context *cmd_ctx)
 {
        command_t *arm_adi_v5_dap_cmd;
        command_t *armv7a_cmd;
index 1b4884c3fbd7754b6af37662667b88345c67df76..5cdffd864a74f5165e485fecdbf2f2620289bd8b 100644 (file)
@@ -152,7 +152,7 @@ struct armv7a_core_reg
 int armv7a_arch_state(struct target *target);
 struct reg_cache *armv7a_build_reg_cache(struct target *target,
                struct armv7a_common *armv7a_common);
-int armv7a_register_commands(struct command_context_s *cmd_ctx);
+int armv7a_register_commands(struct command_context *cmd_ctx);
 int armv7a_init_arch_info(struct target *target, struct armv7a_common *armv7a);
 
 /* map psr mode bits to linear number */
index 9c2e95c38bfd0daf386f4faff150834601d9b117..a7405840d30339d5f64aa3bedb87f45397655a70 100644 (file)
@@ -832,7 +832,7 @@ COMMAND_HANDLER(handle_dap_info_command)
 }
 
 /** Registers commands used to access DAP resources. */
-int armv7m_register_commands(struct command_context_s *cmd_ctx)
+int armv7m_register_commands(struct command_context *cmd_ctx)
 {
        command_t *arm_adi_v5_dap_cmd;
 
index 7debd353a5459b6c97c52df8d7e2bcb6cf9aad9e..7f8190bf7474d6c8cbdde25c510be10a22a449b5 100644 (file)
@@ -142,7 +142,7 @@ int armv7m_arch_state(struct target *target);
 int armv7m_get_gdb_reg_list(struct target *target,
                struct reg **reg_list[], int *reg_list_size);
 
-int armv7m_register_commands(struct command_context_s *cmd_ctx);
+int armv7m_register_commands(struct command_context *cmd_ctx);
 int armv7m_init_arch_info(struct target *target, struct armv7m_common *armv7m);
 
 int armv7m_run_algorithm(struct target *target,
index 43715614d7da0ca13729a5277fe04f08d7d90ff6..cabb2725fa2534b2a575be6c6bd5fbd7c9fcbf42 100644 (file)
 #define AVR_JTAG_INS_LEN       4
 
 /* cli handling */
-int avr_register_commands(struct command_context_s *cmd_ctx);
+int avr_register_commands(struct command_context *cmd_ctx);
 
 /* forward declarations */
 int avr_target_create(struct target *target, Jim_Interp *interp);
-int avr_init_target(struct command_context_s *cmd_ctx, struct target *target);
+int avr_init_target(struct command_context *cmd_ctx, struct target *target);
 
 int avr_arch_state(struct target *target);
 int avr_poll(struct target *target);
@@ -96,7 +96,7 @@ struct target_type avr_target =
        .init_target = avr_init_target,
 };
 
-int avr_register_commands(struct command_context_s *cmd_ctx)
+int avr_register_commands(struct command_context *cmd_ctx)
 {
        LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
@@ -112,7 +112,7 @@ int avr_target_create(struct target *target, Jim_Interp *interp)
        return ERROR_OK;
 }
 
-int avr_init_target(struct command_context_s *cmd_ctx, struct target *target)
+int avr_init_target(struct command_context *cmd_ctx, struct target *target)
 {
        LOG_DEBUG("%s", __FUNCTION__);
        return ERROR_OK;
index 586b9ea605bb172efae15acff09cb536a8fd7b88..6c6136349d5c86fa2ba2b9263b896d91c0eb08a7 100644 (file)
@@ -1443,7 +1443,7 @@ static void cortex_a8_build_reg_cache(struct target *target)
 }
 
 
-static int cortex_a8_init_target(struct command_context_s *cmd_ctx,
+static int cortex_a8_init_target(struct command_context *cmd_ctx,
                struct target *target)
 {
        cortex_a8_build_reg_cache(target);
@@ -1546,7 +1546,7 @@ COMMAND_HANDLER(cortex_a8_handle_dbginit_command)
 }
 
 
-static int cortex_a8_register_commands(struct command_context_s *cmd_ctx)
+static int cortex_a8_register_commands(struct command_context *cmd_ctx)
 {
        command_t *cortex_a8_cmd;
        int retval = ERROR_OK;
index eea9c880e02c1f3dcbaf99c029b9bf495cc587fe..bb0b0c416be85b5d582ee8ab37842d4346f9996a 100644 (file)
@@ -1435,7 +1435,7 @@ static int cortex_m3_bulk_write_memory(struct target *target, uint32_t address,
        return cortex_m3_write_memory(target, address, 4, count, buffer);
 }
 
-static int cortex_m3_init_target(struct command_context_s *cmd_ctx,
+static int cortex_m3_init_target(struct command_context *cmd_ctx,
                struct target *target)
 {
        armv7m_build_reg_cache(target);
@@ -1759,7 +1759,7 @@ static int cortex_m3_target_create(struct target *target, Jim_Interp *interp)
 
 /*--------------------------------------------------------------------------*/
 
-static int cortex_m3_verify_pointer(struct command_context_s *cmd_ctx,
+static int cortex_m3_verify_pointer(struct command_context *cmd_ctx,
                struct cortex_m3_common *cm3)
 {
        if (cm3->common_magic != CORTEX_M3_COMMON_MAGIC) {
@@ -1928,7 +1928,7 @@ COMMAND_HANDLER(handle_cortex_m3_mask_interrupts_command)
        return ERROR_OK;
 }
 
-static int cortex_m3_register_commands(struct command_context_s *cmd_ctx)
+static int cortex_m3_register_commands(struct command_context *cmd_ctx)
 {
        int retval;
        command_t *cortex_m3_cmd;
index b698151347834c22ac511ad9951da118df5e30b0..903951f5a551aa8a77161af95a48925f32a12a0a 100644 (file)
@@ -403,7 +403,7 @@ COMMAND_HANDLER(handle_etb_config_command)
        return ERROR_OK;
 }
 
-static int etb_register_commands(struct command_context_s *cmd_ctx)
+static int etb_register_commands(struct command_context *cmd_ctx)
 {
        command_t *etb_cmd = register_command(cmd_ctx, NULL, "etb",
                        NULL, COMMAND_ANY, "Embedded Trace Buffer");
index cc92098d80cfb5e882501659b537433972dad9cc..ee064ebc16e9364f68bf428b1016f46fa036bd3e 100644 (file)
@@ -219,7 +219,7 @@ static int etm_reg_arch_type = -1;
 static int etm_get_reg(struct reg *reg);
 static int etm_read_reg_w_check(struct reg *reg,
                uint8_t* check_value, uint8_t* check_mask);
-static int etm_register_user_commands(struct command_context_s *cmd_ctx);
+static int etm_register_user_commands(struct command_context *cmd_ctx);
 static int etm_set_reg_w_exec(struct reg *reg, uint8_t *buf);
 static int etm_write_reg(struct reg *reg, uint32_t value);
 
@@ -884,7 +884,7 @@ static int etmv1_data(struct etm_context *ctx, int size, uint32_t *data)
        return 0;
 }
 
-static int etmv1_analyze_trace(struct etm_context *ctx, struct command_context_s *cmd_ctx)
+static int etmv1_analyze_trace(struct etm_context *ctx, struct command_context *cmd_ctx)
 {
        int retval;
        struct arm_instruction instruction;
@@ -2109,7 +2109,7 @@ COMMAND_HANDLER(handle_etm_analyze_command)
        return retval;
 }
 
-int etm_register_commands(struct command_context_s *cmd_ctx)
+int etm_register_commands(struct command_context *cmd_ctx)
 {
        etm_cmd = register_command(cmd_ctx, NULL, "etm", NULL, COMMAND_ANY, "Embedded Trace Macrocell");
 
@@ -2119,7 +2119,7 @@ int etm_register_commands(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-static int etm_register_user_commands(struct command_context_s *cmd_ctx)
+static int etm_register_user_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, etm_cmd, "tracemode", handle_etm_tracemode_command,
                COMMAND_EXEC, "configure/display trace mode: "
index 1ca9b9381f3c820202d7241e0bb2e46c70bf4c92..b74c6d9049451665ad472123276de921a46a48d3 100644 (file)
@@ -126,7 +126,7 @@ struct etm_context;
 struct etm_capture_driver
 {
        char *name;
-       int (*register_commands)(struct command_context_s *cmd_ctx);
+       int (*register_commands)(struct command_context *cmd_ctx);
        int (*init)(struct etm_context *etm_ctx);
        trace_status_t (*status)(struct etm_context *etm_ctx);
        int (*read_trace)(struct etm_context *etm_ctx);
@@ -212,7 +212,7 @@ struct reg_cache* etm_build_reg_cache(struct target *target,
 
 int etm_setup(struct target *target);
 
-int etm_register_commands(struct command_context_s *cmd_ctx);
+int etm_register_commands(struct command_context *cmd_ctx);
 
 #define ERROR_ETM_INVALID_DRIVER       (-1300)
 #define ERROR_ETM_PORTMODE_NOT_SUPPORTED       (-1301)
index 598c79939e6c72f2481bfa01bbf4b3a60be0a188..8301fb06fbec7f6ce16b378469f9a8d80412435e 100644 (file)
@@ -58,7 +58,7 @@ COMMAND_HANDLER(handle_etm_dummy_config_command)
        return ERROR_OK;
 }
 
-static int etm_dummy_register_commands(struct command_context_s *cmd_ctx)
+static int etm_dummy_register_commands(struct command_context *cmd_ctx)
 {
        command_t *etm_dummy_cmd;
 
index d64b53f5cc18dd48eceb956cdc4bdabc76591e7b..96a048ac693bdee4f31e4b9659aaa965e220dba0 100644 (file)
@@ -577,7 +577,7 @@ int feroceon_bulk_write_memory(struct target *target, uint32_t address, uint32_t
        return retval;
 }
 
-int feroceon_init_target(struct command_context_s *cmd_ctx, struct target *target)
+int feroceon_init_target(struct command_context *cmd_ctx, struct target *target)
 {
        arm9tdmi_init_target(cmd_ctx, target);
        return ERROR_OK;
index c6ea66f3b434cac3357fd68a09726bdb969644f8..fe22dd57a4331eafd7af823af8d4a13d55d6a51f 100644 (file)
@@ -331,7 +331,7 @@ int mips32_init_arch_info(struct target *target, struct mips32_common *mips32, s
        return ERROR_OK;
 }
 
-int mips32_register_commands(struct command_context_s *cmd_ctx)
+int mips32_register_commands(struct command_context *cmd_ctx)
 {
        return ERROR_OK;
 }
index b3e0bc40ded2be092e09235dfcbc3d89f7cd6146..7a4ba57561fb6e75c90a884f66e6fd11c4492140 100644 (file)
@@ -146,7 +146,7 @@ int mips32_enable_interrupts(struct target *target, int enable);
 
 int mips32_examine(struct target *target);
 
-int mips32_register_commands(struct command_context_s *cmd_ctx);
+int mips32_register_commands(struct command_context *cmd_ctx);
 
 int mips32_invalidate_core_regs(struct target *target);
 int mips32_get_gdb_reg_list(struct target *target,
index 94a73280c83e8a7aca65722d87b99b7ad6ff6788..6dd00ad5c1e1a1baf6476d09e10e5437be7d45fa 100644 (file)
@@ -39,8 +39,8 @@ int mips_m4k_resume(struct target *target, int current, uint32_t address, int ha
 int mips_m4k_step(struct target *target, int current, uint32_t address, int handle_breakpoints);
 int mips_m4k_read_memory(struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
 int mips_m4k_write_memory(struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
-int mips_m4k_register_commands(struct command_context_s *cmd_ctx);
-int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target *target);
+int mips_m4k_register_commands(struct command_context *cmd_ctx);
+int mips_m4k_init_target(struct command_context *cmd_ctx, struct target *target);
 int mips_m4k_target_create(struct target *target, Jim_Interp *interp);
 
 int mips_m4k_examine(struct target *target);
@@ -902,7 +902,7 @@ int mips_m4k_write_memory(struct target *target, uint32_t address, uint32_t size
                return mips32_dmaacc_write_mem(ejtag_info, address, size, count, (void *)buffer);
 }
 
-int mips_m4k_register_commands(struct command_context_s *cmd_ctx)
+int mips_m4k_register_commands(struct command_context *cmd_ctx)
 {
        int retval;
 
@@ -910,7 +910,7 @@ int mips_m4k_register_commands(struct command_context_s *cmd_ctx)
        return retval;
 }
 
-int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target *target)
+int mips_m4k_init_target(struct command_context *cmd_ctx, struct target *target)
 {
        mips32_build_reg_cache(target);
 
index 390c75d80c415eaa17d2102a458388bd65e9d9c9..c2e13618fbd8a42741f6c44252f6654038dd73e0 100644 (file)
@@ -30,7 +30,7 @@
  */
 
 
-static int oocd_trace_register_commands(struct command_context_s *cmd_ctx);
+static int oocd_trace_register_commands(struct command_context *cmd_ctx);
 
 static int oocd_trace_read_reg(struct oocd_trace *oocd_trace, int reg, uint32_t *value)
 {
@@ -407,7 +407,7 @@ COMMAND_HANDLER(handle_oocd_trace_resync_command)
        return ERROR_OK;
 }
 
-int oocd_trace_register_commands(struct command_context_s *cmd_ctx)
+int oocd_trace_register_commands(struct command_context *cmd_ctx)
 {
        command_t *oocd_trace_cmd;
 
index ca440a7dfec70bbce79f397888add7c078b7c74d..85c228a0c97308b97c35d8df5081f11814515f8d 100644 (file)
@@ -336,7 +336,7 @@ static struct target *get_target_by_num(int num)
        return NULL;
 }
 
-struct target* get_current_target(command_context_t *cmd_ctx)
+struct target* get_current_target(struct command_context *cmd_ctx)
 {
        struct target *target = get_target_by_num(cmd_ctx->current_target);
 
@@ -425,7 +425,7 @@ int target_resume(struct target *target, int current, uint32_t address, int hand
        return retval;
 }
 
-int target_process_reset(struct command_context_s *cmd_ctx, enum target_reset_mode reset_mode)
+int target_process_reset(struct command_context *cmd_ctx, enum target_reset_mode reset_mode)
 {
        char buf[100];
        int retval;
@@ -754,7 +754,7 @@ err_write_phys_memory(struct target *target, uint32_t address,
        return ERROR_FAIL;
 }
 
-int target_init(struct command_context_s *cmd_ctx)
+int target_init(struct command_context *cmd_ctx)
 {
        struct target *target;
        int retval;
@@ -2201,7 +2201,7 @@ COMMAND_HANDLER(handle_step_command)
        return target->type->step(target, current_pc, addr, 1);
 }
 
-static void handle_md_output(struct command_context_s *cmd_ctx,
+static void handle_md_output(struct command_context *cmd_ctx,
                struct target *target, uint32_t address, unsigned size,
                unsigned count, const uint8_t *buffer)
 {
@@ -2709,7 +2709,7 @@ COMMAND_HANDLER(handle_test_image_command)
        return CALL_COMMAND_HANDLER(handle_verify_image_command_internal, 0);
 }
 
-static int handle_bp_command_list(struct command_context_s *cmd_ctx)
+static int handle_bp_command_list(struct command_context *cmd_ctx)
 {
        struct target *target = get_current_target(cmd_ctx);
        struct breakpoint *breakpoint = target->breakpoints;
@@ -2737,7 +2737,7 @@ static int handle_bp_command_list(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-static int handle_bp_command_set(struct command_context_s *cmd_ctx,
+static int handle_bp_command_set(struct command_context *cmd_ctx,
                uint32_t addr, uint32_t length, int hw)
 {
        struct target *target = get_current_target(cmd_ctx);
@@ -3132,7 +3132,7 @@ static int new_int_array_element(Jim_Interp * interp, const char *varname, int i
 
 static int jim_mem2array(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 {
-       command_context_t *context;
+       struct command_context *context;
        struct target *target;
 
        context = Jim_GetAssocData(interp, "context");
@@ -3321,7 +3321,7 @@ static int get_int_array_element(Jim_Interp * interp, const char *varname, int i
 
 static int jim_array2mem(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 {
-       command_context_t *context;
+       struct command_context *context;
        struct target *target;
 
        context = Jim_GetAssocData(interp, "context");
@@ -3822,7 +3822,7 @@ static int tcl_target_func(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        uint8_t  target_buf[32];
        Jim_Nvp *n;
        struct target *target;
-       struct command_context_s *cmd_ctx;
+       struct command_context *cmd_ctx;
        int e;
 
        enum {
@@ -4238,7 +4238,7 @@ static int target_create(Jim_GetOptInfo *goi)
        int e;
        int x;
        struct target *target;
-       struct command_context_s *cmd_ctx;
+       struct command_context *cmd_ctx;
 
        cmd_ctx = Jim_GetAssocData(goi->interp, "context");
        if (goi->argc < 3) {
@@ -4390,7 +4390,7 @@ static int jim_target(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 {
        int x,r,e;
        jim_wide w;
-       struct command_context_s *cmd_ctx;
+       struct command_context *cmd_ctx;
        struct target *target;
        Jim_GetOptInfo goi;
        enum tcmd {
@@ -4679,7 +4679,7 @@ COMMAND_HANDLER(handle_fast_load_command)
 
 static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 {
-       command_context_t *context;
+       struct command_context *context;
        struct target *target;
        int retval;
 
@@ -4763,7 +4763,7 @@ static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        return JIM_OK;
 }
 
-int target_register_commands(struct command_context_s *cmd_ctx)
+int target_register_commands(struct command_context *cmd_ctx)
 {
 
        register_command(cmd_ctx, NULL, "targets",
@@ -4776,7 +4776,7 @@ int target_register_commands(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-int target_register_user_commands(struct command_context_s *cmd_ctx)
+int target_register_user_commands(struct command_context *cmd_ctx)
 {
        int retval = ERROR_OK;
        if ((retval = target_request_register_commands(cmd_ctx)) != ERROR_OK)
index 5f29e7f4526e77701ec614eb2ba80d799b2ba928..914d62fd0af1fd87cca79a1d4f5a306e96981af4 100644 (file)
@@ -34,7 +34,7 @@
 
 struct reg;
 struct trace;
-struct command_context_s;
+struct command_context;
 
 
 /**
@@ -241,12 +241,12 @@ struct target_timer_callback
        struct target_timer_callback *next;
 };
 
-int target_register_commands(struct command_context_s *cmd_ctx);
-int target_register_user_commands(struct command_context_s *cmd_ctx);
-int target_init(struct command_context_s *cmd_ctx);
+int target_register_commands(struct command_context *cmd_ctx);
+int target_register_user_commands(struct command_context *cmd_ctx);
+int target_init(struct command_context *cmd_ctx);
 int target_examine(void);
 int handle_target(void *priv);
-int target_process_reset(struct command_context_s *cmd_ctx,
+int target_process_reset(struct command_context *cmd_ctx,
                enum target_reset_mode reset_mode);
 
 int target_register_event_callback(
@@ -278,7 +278,7 @@ int target_call_timer_callbacks(void);
  */
 int target_call_timer_callbacks_now(void);
 
-struct target* get_current_target(struct command_context_s *cmd_ctx);
+struct target* get_current_target(struct command_context *cmd_ctx);
 struct target *get_target(const char *id);
 
 /**
index f1bb243deb69a26d300a7bc8c8074bc67e4ba033..1f02be6fd2eec169a98717016b4909df09e42fbd 100644 (file)
@@ -150,7 +150,7 @@ int target_request(struct target *target, uint32_t request)
        return ERROR_OK;
 }
 
-static int add_debug_msg_receiver(struct command_context_s *cmd_ctx, struct target *target)
+static int add_debug_msg_receiver(struct command_context *cmd_ctx, struct target *target)
 {
        struct debug_msg_receiver **p = &target->dbgmsg;
 
@@ -178,7 +178,7 @@ static int add_debug_msg_receiver(struct command_context_s *cmd_ctx, struct targ
        return ERROR_OK;
 }
 
-static struct debug_msg_receiver* find_debug_msg_receiver(struct command_context_s *cmd_ctx, struct target *target)
+static struct debug_msg_receiver* find_debug_msg_receiver(struct command_context *cmd_ctx, struct target *target)
 {
        int do_all_targets = 0;
        struct debug_msg_receiver **p = &target->dbgmsg;
@@ -211,7 +211,7 @@ static struct debug_msg_receiver* find_debug_msg_receiver(struct command_context
        return NULL;
 }
 
-int delete_debug_msg_receiver(struct command_context_s *cmd_ctx, struct target *target)
+int delete_debug_msg_receiver(struct command_context *cmd_ctx, struct target *target)
 {
        struct debug_msg_receiver **p;
        struct debug_msg_receiver *c;
@@ -299,7 +299,7 @@ COMMAND_HANDLER(handle_target_request_debugmsgs_command)
        return ERROR_OK;
 }
 
-int target_request_register_commands(struct command_context_s *cmd_ctx)
+int target_request_register_commands(struct command_context *cmd_ctx)
 {
        target_request_cmd =
                register_command(cmd_ctx, NULL, "target_request", NULL, COMMAND_ANY, "target_request commands");
index 1fa7e8b4af7c58d919f48381a78046578da2ddda..cc9f3b9ac9bbd6b794b4c1f7796c2c1e54c93795 100644 (file)
@@ -38,13 +38,13 @@ typedef enum target_req_cmd
 
 struct debug_msg_receiver
 {
-       command_context_t *cmd_ctx;
+       struct command_context *cmd_ctx;
        struct debug_msg_receiver *next;
 };
 
 int target_request(struct target *target, uint32_t request);
-int delete_debug_msg_receiver(struct command_context_s *cmd_ctx,
+int delete_debug_msg_receiver(struct command_context *cmd_ctx,
                struct target *target);
-int target_request_register_commands(struct command_context_s *cmd_ctx);
+int target_request_register_commands(struct command_context *cmd_ctx);
 
 #endif /* TARGET_REQUEST_H */
index 32c58abba28208deb389954041b7884220c15ebc..f601b191a261429d2fc03b7dcb2d1612a3e5c909 100644 (file)
@@ -151,7 +151,7 @@ struct target_type
         */
        int (*run_algorithm)(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info);
 
-       int (*register_commands)(struct command_context_s *cmd_ctx);
+       int (*register_commands)(struct command_context *cmd_ctx);
 
        /* called when target is created */
        int (*target_create)(struct target *target, Jim_Interp *interp);
@@ -177,7 +177,7 @@ struct target_type
         * It is illegal to talk to the target at this stage as this fn is invoked
         * before the JTAG chain has been examined/verified
         * */
-       int (*init_target)(struct command_context_s *cmd_ctx, struct target *target);
+       int (*init_target)(struct command_context *cmd_ctx, struct target *target);
 
        /* translate from virtual to physical address. Default implementation is successful
         * no-op(i.e. virtual==physical).
index bb57978cf66dfb60e4e22c7c7666704d9c4a31b7..aa8fb29434c88fee11c6b27063dfc5173244f3c3 100644 (file)
@@ -156,7 +156,7 @@ COMMAND_HANDLER(handle_trace_history_command)
        return ERROR_OK;
 }
 
-int trace_register_commands(struct command_context_s *cmd_ctx)
+int trace_register_commands(struct command_context *cmd_ctx)
 {
        command_t *trace_cmd =
                register_command(cmd_ctx, NULL, "trace", NULL, COMMAND_ANY, "trace commands");
index 483f9429774df83e8568c6903fcd765af4d21258..d6fd63e4ba9a33d5c5beda14c4f7152f7125b0db 100644 (file)
@@ -23,7 +23,7 @@
 #include "types.h"
 
 struct target;
-struct command_context_s;
+struct command_context;
 
 struct trace_point
 {
@@ -52,7 +52,7 @@ typedef enum trace_status
 } trace_status_t;
 
 int trace_point(struct target *target, uint32_t number);
-int trace_register_commands(struct command_context_s *cmd_ctx);
+int trace_register_commands(struct command_context *cmd_ctx);
 
 #define ERROR_TRACE_IMAGE_UNAVAILABLE          -(1500)
 #define ERROR_TRACE_INSTRUCTION_UNAVAILABLE    -(1501)
index ccf23b491b427d265a9ac55cd2bb821ac358edf3..73c1ba1cc2d2c7b8d2931ae8fc4648b4005db7f3 100644 (file)
@@ -146,7 +146,7 @@ static int xscale_set_reg_u32(struct reg *reg, uint32_t value)
 
 static const char xscale_not[] = "target is not an XScale";
 
-static int xscale_verify_pointer(struct command_context_s *cmd_ctx,
+static int xscale_verify_pointer(struct command_context *cmd_ctx,
                struct xscale_common *xscale)
 {
        if (xscale->common_magic != XSCALE_COMMON_MAGIC) {
@@ -2630,7 +2630,7 @@ static int xscale_branch_address(struct xscale_trace_data *trace_data,
        return 0;
 }
 
-static int xscale_analyze_trace(struct target *target, command_context_t *cmd_ctx)
+static int xscale_analyze_trace(struct target *target, struct command_context *cmd_ctx)
 {
        struct xscale_common *xscale = target_to_xscale(target);
        int next_pc_ok = 0;
@@ -2860,7 +2860,7 @@ static void xscale_build_reg_cache(struct target *target)
        xscale->reg_cache = (*cache_p);
 }
 
-static int xscale_init_target(struct command_context_s *cmd_ctx,
+static int xscale_init_target(struct command_context *cmd_ctx,
                struct target *target)
 {
        xscale_build_reg_cache(target);
@@ -3575,7 +3575,7 @@ COMMAND_HANDLER(xscale_handle_cp15)
        return ERROR_OK;
 }
 
-static int xscale_register_commands(struct command_context_s *cmd_ctx)
+static int xscale_register_commands(struct command_context *cmd_ctx)
 {
        command_t *xscale_cmd;
 
index c6daf5fddfb5fd8e1911645840d0ed214be13dde..3fe2c0fd5317ba0393ec478904daaf573827a361 100644 (file)
@@ -1050,7 +1050,7 @@ COMMAND_HANDLER(handle_xsvf_command)
        return ERROR_OK;
 }
 
-int xsvf_register_commands(struct command_context_s *cmd_ctx)
+int xsvf_register_commands(struct command_context *cmd_ctx)
 {
        register_command(cmd_ctx, NULL, "xsvf",
                        &handle_xsvf_command, COMMAND_EXEC,
index 93cccf0ae0d28104b09e82a2e7f99be4e344d5d5..2153a2dd3d4336c3a4808dbe0ec01b126aec282b 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "command.h"
 
-int xsvf_register_commands(struct command_context_s *cmd_ctx);
+int xsvf_register_commands(struct command_context *cmd_ctx);
 
 #define ERROR_XSVF_EOF (-200)
 #define ERROR_XSVF_FAILED      (-201)