diff --git a/src/raspberrypi/devices/disk.cpp b/src/raspberrypi/devices/disk.cpp index 350aac09..e90aba30 100644 --- a/src/raspberrypi/devices/disk.cpp +++ b/src/raspberrypi/devices/disk.cpp @@ -442,7 +442,7 @@ void Disk::Read6(SASIDEV *controller) } // Check capacity - DWORD capacity = GetBlockCount(); + uint32_t capacity = GetBlockCount(); if (record > capacity || record + ctrl->blocks > capacity) { ostringstream s; s << "Media capacity of " << capacity << " blocks exceeded: " @@ -575,7 +575,7 @@ void Disk::Write6(SASIDEV *controller) } // Check capacity - DWORD capacity = GetBlockCount(); + uint32_t capacity = GetBlockCount(); if (record > capacity || record + ctrl->blocks > capacity) { ostringstream s; s << "Media capacity of " << capacity << " blocks exceeded: " @@ -2520,7 +2520,7 @@ bool Disk::GetStartAndCount(SASIDEV *controller, uint64_t& start, uint32_t& coun } // Check capacity - uint64_t capacity = GetBlockCount(); + uint32_t capacity = GetBlockCount(); if (start > capacity || start + count > capacity) { ostringstream s; s << "Media capacity of " << capacity << " blocks exceeded: " @@ -2570,7 +2570,7 @@ void Disk::SetConfiguredSectorSize(int configured_sector_size) this->configured_sector_size = configured_sector_size; } -DWORD Disk::GetBlockCount() const +uint32_t Disk::GetBlockCount() const { return disk.blocks; } diff --git a/src/raspberrypi/devices/disk.h b/src/raspberrypi/devices/disk.h index 5adfb722..c8e31482 100644 --- a/src/raspberrypi/devices/disk.h +++ b/src/raspberrypi/devices/disk.h @@ -223,7 +223,7 @@ public: void SetSectorSizeConfigurable(bool); int GetConfiguredSectorSize() const; void SetConfiguredSectorSize(int); - DWORD GetBlockCount() const; + uint32_t GetBlockCount() const; void SetBlockCount(DWORD); bool GetStartAndCount(SASIDEV *, uint64_t&, uint32_t&, bool); diff --git a/src/raspberrypi/devices/scsimo.cpp b/src/raspberrypi/devices/scsimo.cpp index bc4a4049..60dfbfb7 100644 --- a/src/raspberrypi/devices/scsimo.cpp +++ b/src/raspberrypi/devices/scsimo.cpp @@ -259,7 +259,7 @@ int SCSIMO::AddVendor(int page, BOOL change, BYTE *buf) if (IsReady()) { unsigned spare = 0; unsigned bands = 0; - DWORD blocks = GetBlockCount(); + uint32_t blocks = GetBlockCount(); if (GetSectorSize() == 9) switch (blocks) { // 128MB