diff options
Diffstat (limited to 'src/target/target.c')
-rw-r--r-- | src/target/target.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/target/target.c b/src/target/target.c index fcdcc363..82cbbff5 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2648,9 +2648,13 @@ COMMAND_HANDLER(handle_dump_image_command) if ((ERROR_OK == retval) && (duration_measure(&bench) == ERROR_OK)) { + int filesize; + retval = fileio_size(&fileio, &filesize); + if (retval != ERROR_OK) + return retval; command_print(CMD_CTX, - "dumped %ld bytes in %fs (%0.3f KiB/s)", (long)fileio_size(&fileio), - duration_elapsed(&bench), duration_kbps(&bench, fileio_size(&fileio))); + "dumped %ld bytes in %fs (%0.3f KiB/s)", (long)filesize, + duration_elapsed(&bench), duration_kbps(&bench, filesize)); } return retval; |