Replaced BOOL

This commit is contained in:
Uwe Seimet 2021-08-22 22:31:04 +02:00
parent 7db4ac273c
commit 3a1e1fbb47
4 changed files with 27 additions and 27 deletions

View File

@ -985,7 +985,7 @@ void SASIDEV::Send()
// Remove block and initialize the result
ctrl.blocks--;
BOOL result = TRUE;
BOOL result = true;
// Process after data collection (read/data-in only)
if (ctrl.phase == BUS::datain) {
@ -1077,16 +1077,16 @@ void SASIDEV::Receive()
// Remove the control block and initialize the result
ctrl.blocks--;
BOOL result = TRUE;
bool result = true;
// Process the data out phase
if (ctrl.phase == BUS::dataout) {
if (ctrl.blocks == 0) {
// End with this buffer
result = XferOut(FALSE);
result = XferOut(false);
} else {
// Continue to next buffer (set offset, length)
result = XferOut(TRUE);
result = XferOut(true);
}
}
@ -1128,7 +1128,7 @@ void SASIDEV::Receive()
// *Reset offset and length
//
//---------------------------------------------------------------------------
BOOL SASIDEV::XferIn(BYTE *buf)
bool SASIDEV::XferIn(BYTE *buf)
{
ASSERT(ctrl.phase == BUS::datain);
LOGTRACE("%s ctrl.cmd[0]=%02X", __PRETTY_FUNCTION__, (unsigned int)ctrl.cmd[0]);
@ -1136,7 +1136,7 @@ BOOL SASIDEV::XferIn(BYTE *buf)
// Logical Unit
DWORD lun = (ctrl.cmd[1] >> 5) & 0x07;
if (!ctrl.unit[lun]) {
return FALSE;
return false;
}
// Limited to read commands
@ -1151,7 +1151,7 @@ BOOL SASIDEV::XferIn(BYTE *buf)
// If there is an error, go to the status phase
if (ctrl.length <= 0) {
// Cancel data-in
return FALSE;
return false;
}
// If things are normal, work setting
@ -1161,11 +1161,11 @@ BOOL SASIDEV::XferIn(BYTE *buf)
// Other (impossible)
default:
ASSERT(FALSE);
return FALSE;
return false;
}
// Succeeded in setting the buffer
return TRUE;
return true;
}
//---------------------------------------------------------------------------
@ -1174,14 +1174,14 @@ BOOL SASIDEV::XferIn(BYTE *buf)
// *If cont=true, reset the offset and length
//
//---------------------------------------------------------------------------
BOOL SASIDEV::XferOut(BOOL cont)
bool SASIDEV::XferOut(bool cont)
{
ASSERT(ctrl.phase == BUS::dataout);
// Logical Unit
DWORD lun = (ctrl.cmd[1] >> 5) & 0x07;
if (!ctrl.unit[lun]) {
return FALSE;
return false;
}
Disk *device = ctrl.unit[lun];
@ -1191,7 +1191,7 @@ BOOL SASIDEV::XferOut(BOOL cont)
if (!device->ModeSelect(
ctrl.cmd, ctrl.buffer, ctrl.offset)) {
// MODE SELECT failed
return FALSE;
return false;
}
break;
@ -1205,7 +1205,7 @@ BOOL SASIDEV::XferOut(BOOL cont)
if (device->IsBridge()) {
if (!((SCSIBR*)device)->SendMessage10(ctrl.cmd, ctrl.buffer)) {
// write failed
return FALSE;
return false;
}
// If normal, work setting
@ -1219,7 +1219,7 @@ BOOL SASIDEV::XferOut(BOOL cont)
LOGTRACE("%s Doing special case write for DaynaPort", __PRETTY_FUNCTION__);
if (!(SCSIDaynaPort*)device->Write(ctrl.cmd, ctrl.buffer, ctrl.length)) {
// write failed
return FALSE;
return false;
}
LOGTRACE("%s Done with DaynaPort Write", __PRETTY_FUNCTION__);
@ -1232,7 +1232,7 @@ BOOL SASIDEV::XferOut(BOOL cont)
LOGTRACE("%s eCmdVerify Calling Write... cmd: %02X next: %d", __PRETTY_FUNCTION__, (WORD)ctrl.cmd[0], (int)ctrl.next);
if (!device->Write(ctrl.cmd, ctrl.buffer, ctrl.next - 1)) {
// Write failed
return FALSE;
return false;
}
// If you do not need the next block, end here
@ -1245,7 +1245,7 @@ BOOL SASIDEV::XferOut(BOOL cont)
ctrl.length = device->WriteCheck(ctrl.next - 1);
if (ctrl.length <= 0) {
// Cannot write
return FALSE;
return false;
}
// If normal, work setting
@ -1267,7 +1267,7 @@ BOOL SASIDEV::XferOut(BOOL cont)
}
// Buffer saved successfully
return TRUE;
return true;
}
//---------------------------------------------------------------------------

View File

@ -153,8 +153,8 @@ public:
int GetSCSIID() {return ctrl.m_scsi_id;} // Get the ID
void GetCTRL(ctrl_t *buffer); // Get the internal information
ctrl_t* GetWorkAddr() { return &ctrl; } // Get the internal information address
virtual BOOL IsSASI() const {return TRUE;} // SASI Check
virtual BOOL IsSCSI() const {return FALSE;} // SCSI check
virtual bool IsSASI() const { return true; } // SASI Check
virtual bool IsSCSI() const { return false; } // SCSI check
public:
void DataIn(); // Data in phase
@ -190,8 +190,8 @@ protected:
virtual void Send(); // Send data
virtual void Receive(); // Receive data
BOOL XferIn(BYTE* buf); // Data transfer IN
BOOL XferOut(BOOL cont); // Data transfer OUT
bool XferIn(BYTE* buf); // Data transfer IN
bool XferOut(bool cont); // Data transfer OUT
// Special operations
void FlushUnit(); // Flush the logical unit

View File

@ -499,7 +499,7 @@ void SCSIDEV::Send()
// Block subtraction, result initialization
ctrl.blocks--;
BOOL result = TRUE;
BOOL result = true;
// Processing after data collection (read/data-in only)
if (ctrl.phase == BUS::datain) {
@ -605,7 +605,7 @@ void SCSIDEV::Receive()
// Block subtraction, result initialization
ctrl.blocks--;
BOOL result = TRUE;
bool result = true;
// Processing after receiving data (by phase)
LOGTRACE("%s ctrl.phase: %d (%s)",__PRETTY_FUNCTION__, (int)ctrl.phase, BUS::GetPhaseStrRaw(ctrl.phase));
@ -615,10 +615,10 @@ void SCSIDEV::Receive()
case BUS::dataout:
if (ctrl.blocks == 0) {
// End with this buffer
result = XferOut(FALSE);
result = XferOut(false);
} else {
// Continue to next buffer (set offset, length)
result = XferOut(TRUE);
result = XferOut(true);
}
break;

View File

@ -96,8 +96,8 @@ public:
BUS::phase_t Process(); // Run
// Other
BOOL IsSASI() const {return FALSE;} // SASI Check
BOOL IsSCSI() const {return TRUE;} // SCSI check
bool IsSASI() const { return false; } // SASI Check
bool IsSCSI() const { return true; } // SCSI check
void Error(ERROR_CODES::sense_key sense_key = ERROR_CODES::sense_key::NO_SENSE,
ERROR_CODES::asc asc = ERROR_CODES::asc::NO_ADDITIONAL_SENSE_INFORMATION) override; // Common erorr handling