Fix build.

Change-Id: Ib8a1d0ad66a74b4bc85fd70b4cd82d1ccc200e56
Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
Tim Newsome 2021-06-30 15:01:45 -07:00
parent 5edbbb4827
commit c10422f0fa
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}