This commit is contained in:
2026-02-26 11:07:35 +01:00
parent 0017f3b3f8
commit 402781f49c
2 changed files with 10 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ static protocol_cmd_t current_command = CMD_INVALID;
void send_ok()
{
const char *response = "OK\n";
LOG_DBG("Sending response: %s", response);
LOG_DBG("Sending response: OK");
usb_write_buffer((const uint8_t *)response, strlen(response));
}
@@ -33,7 +33,7 @@ void send_error(int32_t error_code)
{
char response[32];
snprintf(response, sizeof(response), "ERR %d\n", error_code);
LOG_DBG("Sending response: %s", response);
LOG_DBG("Sending response: ERR %d", error_code);
usb_write_buffer((const uint8_t *)response, strlen(response));
}
@@ -86,6 +86,7 @@ int put_binary_file(const char *filename, ssize_t filesize, uint32_t expected_cr
size_t accumulated = 0;
fs_file_t_init(&file);
fs_unlink(filename);
LOG_DBG("Opening file '%s' for writing (expected size: %zd bytes, expected CRC32: 0x%08x)", filename, filesize, expected_crc32);
rc = fs_open(&file, filename, FS_O_CREATE | FS_O_WRITE);
if (rc < 0)