Data type update for block count

This commit is contained in:
Uwe Seimet 2021-08-23 16:35:19 +02:00
parent 61c43ba1b6
commit 1e0f51488e
3 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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