Disk: Allow mismatched access for Read and Write drivers

This will cause the driver to fall back to the least common
denominator.
This commit is contained in:
Paul Hollinsky
2022-03-03 20:29:13 -05:00
parent 1118428250
commit 0a15adbe91
9 changed files with 56 additions and 7 deletions
@@ -16,7 +16,6 @@ namespace Disk {
*/
class ExtExtractorDiskReadDriver : public ReadDriver {
public:
Access getAccess() const override { return Access::EntireCard; }
std::pair<uint32_t, uint32_t> getBlockSizeBounds() const override {
static_assert(SectorSize <= std::numeric_limits<uint32_t>::max(), "Incorrect sector size");
static_assert(SectorSize >= std::numeric_limits<uint32_t>::min(), "Incorrect sector size");
@@ -36,6 +35,8 @@ private:
uint8_t headerLength = 7; // Correct for Ethernet
Access getPossibleAccess() const override { return Access::EntireCard; }
optional<uint64_t> readLogicalDiskAligned(Communication& com, device_eventhandler_t report,
uint64_t pos, uint8_t* into, uint64_t amount, std::chrono::milliseconds timeout) override;
};