mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-26 16:31:11 +00:00
Data type update for block count
This commit is contained in:
parent
61c43ba1b6
commit
1e0f51488e
@ -442,7 +442,7 @@ void Disk::Read6(SASIDEV *controller)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check capacity
|
// Check capacity
|
||||||
DWORD capacity = GetBlockCount();
|
uint32_t capacity = GetBlockCount();
|
||||||
if (record > capacity || record + ctrl->blocks > capacity) {
|
if (record > capacity || record + ctrl->blocks > capacity) {
|
||||||
ostringstream s;
|
ostringstream s;
|
||||||
s << "Media capacity of " << capacity << " blocks exceeded: "
|
s << "Media capacity of " << capacity << " blocks exceeded: "
|
||||||
@ -575,7 +575,7 @@ void Disk::Write6(SASIDEV *controller)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check capacity
|
// Check capacity
|
||||||
DWORD capacity = GetBlockCount();
|
uint32_t capacity = GetBlockCount();
|
||||||
if (record > capacity || record + ctrl->blocks > capacity) {
|
if (record > capacity || record + ctrl->blocks > capacity) {
|
||||||
ostringstream s;
|
ostringstream s;
|
||||||
s << "Media capacity of " << capacity << " blocks exceeded: "
|
s << "Media capacity of " << capacity << " blocks exceeded: "
|
||||||
@ -2520,7 +2520,7 @@ bool Disk::GetStartAndCount(SASIDEV *controller, uint64_t& start, uint32_t& coun
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check capacity
|
// Check capacity
|
||||||
uint64_t capacity = GetBlockCount();
|
uint32_t capacity = GetBlockCount();
|
||||||
if (start > capacity || start + count > capacity) {
|
if (start > capacity || start + count > capacity) {
|
||||||
ostringstream s;
|
ostringstream s;
|
||||||
s << "Media capacity of " << capacity << " blocks exceeded: "
|
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;
|
this->configured_sector_size = configured_sector_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD Disk::GetBlockCount() const
|
uint32_t Disk::GetBlockCount() const
|
||||||
{
|
{
|
||||||
return disk.blocks;
|
return disk.blocks;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ public:
|
|||||||
void SetSectorSizeConfigurable(bool);
|
void SetSectorSizeConfigurable(bool);
|
||||||
int GetConfiguredSectorSize() const;
|
int GetConfiguredSectorSize() const;
|
||||||
void SetConfiguredSectorSize(int);
|
void SetConfiguredSectorSize(int);
|
||||||
DWORD GetBlockCount() const;
|
uint32_t GetBlockCount() const;
|
||||||
void SetBlockCount(DWORD);
|
void SetBlockCount(DWORD);
|
||||||
bool GetStartAndCount(SASIDEV *, uint64_t&, uint32_t&, bool);
|
bool GetStartAndCount(SASIDEV *, uint64_t&, uint32_t&, bool);
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ int SCSIMO::AddVendor(int page, BOOL change, BYTE *buf)
|
|||||||
if (IsReady()) {
|
if (IsReady()) {
|
||||||
unsigned spare = 0;
|
unsigned spare = 0;
|
||||||
unsigned bands = 0;
|
unsigned bands = 0;
|
||||||
DWORD blocks = GetBlockCount();
|
uint32_t blocks = GetBlockCount();
|
||||||
|
|
||||||
if (GetSectorSize() == 9) switch (blocks) {
|
if (GetSectorSize() == 9) switch (blocks) {
|
||||||
// 128MB
|
// 128MB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user