Hey, everyone I'm trying to use the following tool:
https://bitcointalk.org/index.php?topic=25091.0To recover keys off an old 2011 era hard drive. The problem is the drive has some bad sectors and I get a drive I/O error crashing the program.
static int refill_buf(void) {
int ret;
//printf("refill_buf: fill = %i pos = %i\n", buffill, bufpos);
if(bufpos > BUF_WATERMARK) {
memcpy(buf, buf + BUF_SEGMENT, BUF_LEN-BUF_SEGMENT);
buffill -= BUF_SEGMENT;
bufpos -= BUF_SEGMENT;
}
if(buffill < BUF_LEN) {
ret = read(f, buf+buffill, BUF_LEN-buffill);
if(ret < 0) {
perror("Device read");
exit(1);
}
//printf("Read %i bytes\n", ret);
buffill += ret;
fpos += ret;
if(fpos > fnextcp) {
show_progress();
fnextcp = fpos + (ftotallen/1024);
}
return ret;
} else {
return -1;
}
}
Is there a simple way to modify the code to skip ahead instead of jumping to the Device read exit block?