Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions rock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,10 @@ int rock_flash_read_lba_to_file_progress(struct xrock_ctx_t * ctx, uint32_t sec,

FILE * f = fopen(filename, "w");
if(!f)
return 0;
{
perror("Failed to open file for writing");
exit(-1);
}

if(cnt <= 65536)
MAXSEC = 128;
Expand Down Expand Up @@ -1481,7 +1484,10 @@ int rock_flash_write_lba_from_file_progress(struct xrock_ctx_t * ctx, uint32_t s

FILE * f = fopen(filename, "r");
if(!f)
return 0;
{
perror("Failed to read file");
exit(-1);
}

fseek(f, 0, SEEK_END);
int64_t len = ftell(f);
Expand Down