From c10422f0fa263021942e2461d0d9f2dd30c44b18 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 30 Jun 2021 15:01:45 -0700 Subject: [PATCH] Fix build. Change-Id: Ib8a1d0ad66a74b4bc85fd70b4cd82d1ccc200e56 Signed-off-by: Tim Newsome --- src/flash/nor/gd32vf103.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/flash/nor/gd32vf103.c b/src/flash/nor/gd32vf103.c index 96c08f97f..562f41e7b 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; }