Correctly store all bad sectors, not just first one on run.

This commit is contained in:
2017-06-08 21:47:18 +01:00
parent ea26320d65
commit 3395c01fda
6 changed files with 16 additions and 8 deletions

View File

@@ -570,7 +570,8 @@ namespace DiscImageChef.Core.Devices.Dumping
// TODO: Record error on mapfile
errored += blocksToRead;
unreadableSectors.Add(i);
for(ulong b = i; b < i + blocksToRead; b++)
unreadableSectors.Add(b);
DicConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf));
if(cmdDuration < 500)
mhddLog.Write(i, 65535);