summaryrefslogtreecommitdiff
path: root/src/scrounge.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2004-08-16 16:46:29 +0000
committerStef Walter <stef@thewalter.net>2004-08-16 16:46:29 +0000
commit880e7364a7b9e73ab2193e02ffa92af5b8647083 (patch)
treed931a800d4769fc1252149afebe47fc5e2d73008 /src/scrounge.c
parent79896ee5a3fea2c3c32ffff0bcc6f0e17c424516 (diff)
- Don't exit on error reading source disk
- Don't try to map sectors when no MFT loaded
Diffstat (limited to 'src/scrounge.c')
-rw-r--r--src/scrounge.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/scrounge.c b/src/scrounge.c
index 7dd7134..e446e58 100644
--- a/src/scrounge.c
+++ b/src/scrounge.c
@@ -406,7 +406,10 @@ void processMFTRecord(partitioninfo* pi, uint64 sector, uint32 flags)
dataSector = CLUSTER_TO_SECTOR(*pi, (datarun->cluster + i));
if(!ntfsx_cluster_read(&cluster, pi, dataSector, pi->device))
- err(1, "couldn't read sector from disk");
+ {
+ warn("couldn't read sector from disk");
+ break;
+ }
#ifdef _DEBUG
if(g_verifyMode)
@@ -635,7 +638,10 @@ void scroungeUsingRaw(partitioninfo* pi)
sz = read(pi->device, buffSec, kSectorSize);
if(sz == -1 || sz != kSectorSize)
- errx(1, "can't read drive sector");
+ {
+ warn("can't read drive sector");
+ continue;
+ }
/* Check beginning of sector for the magic signature */
if(!memcmp(&magic, &buffSec, sizeof(magic)))