aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2021-06-30 15:01:45 -0700
committerTim Newsome <tim@sifive.com>2021-06-30 16:02:06 -0700
commitc10422f0fa263021942e2461d0d9f2dd30c44b18 (patch)
tree0d385d88603ac2bd93abc1ca96eacab03db50e5a
parent5edbbb4827ee8c12d16c9474d842154b4eaf5c38 (diff)
downloadriscv-openocd-c10422f0fa263021942e2461d0d9f2dd30c44b18.zip
riscv-openocd-c10422f0fa263021942e2461d0d9f2dd30c44b18.tar.gz
riscv-openocd-c10422f0fa263021942e2461d0d9f2dd30c44b18.tar.bz2
Fix build.
Change-Id: Ib8a1d0ad66a74b4bc85fd70b4cd82d1ccc200e56 Signed-off-by: Tim Newsome <tim@sifive.com>
-rw-r--r--src/flash/nor/gd32vf103.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/flash/nor/gd32vf103.c b/src/flash/nor/gd32vf103.c
index 96c08f9..562f41e 100644
--- a/src/flash/nor/gd32vf103.c
+++ b/src/flash/nor/gd32vf103.c
@@ -110,7 +110,7 @@ struct gd32vf103_flash_bank {
};
static int gd32vf103_mass_erase(struct flash_bank *bank);
-static int get_gd32vf103_info(struct flash_bank *bank, char *buf, int buf_size);
+static int get_gd32vf103_info(struct flash_bank *bank, struct command_invocation *cmd);
static int gd32vf103_write_block(struct flash_bank *bank, const uint8_t *buffer,
uint32_t offset, uint32_t count);
@@ -931,7 +931,7 @@ static int gd32vf103_auto_probe(struct flash_bank *bank)
return gd32vf103_probe(bank);
}
-static int get_gd32vf103_info(struct flash_bank *bank, char *buf, int buf_size)
+static int get_gd32vf103_info(struct flash_bank *bank, struct command_invocation *cmd)
{
uint32_t dbgmcu_idcode;
@@ -961,14 +961,14 @@ static int get_gd32vf103_info(struct flash_bank *bank, char *buf, int buf_size)
}
break;
default:
- snprintf(buf, buf_size, "Cannot identify target as a GD32VF103 x\n");
+ command_print_sameline(cmd, "Cannot identify target as a GD32VF103 x\n");
return ERROR_FAIL;
}
if (rev_str != NULL)
- snprintf(buf, buf_size, "%s - Rev: %s", device_str, rev_str);
+ command_print_sameline(cmd, "%s - Rev: %s\n", device_str, rev_str);
else
- snprintf(buf, buf_size, "%s - Rev: unknown (0x%04x)", device_str, rev_id);
+ command_print_sameline(cmd, "%s - Rev: unknown (0x%04x)\n", device_str, rev_id);
return ERROR_OK;
}