Skip to content

Commit

Permalink
Fix regression in capacity calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Nov 1, 2023
1 parent dae48cd commit 02696d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/scsidump/scsidump_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ pair<uint64_t, uint32_t> ScsiDump::ReadCapacity()
(static_cast<uint32_t>(buffer[sector_size_offset + 2]) << 8) |
static_cast<uint32_t>(buffer[sector_size_offset + 3]);

return { capacity, sector_size };
return { capacity - sector_size, sector_size };
}

void ScsiDump::Read(uint32_t bstart, uint32_t blength, int length)
Expand Down

0 comments on commit 02696d0

Please sign in to comment.