mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-29 01:49:19 +00:00
Do not write data when executing VERIFY10/VERIFY16 (#1250)
This commit is contained in:
parent
2ec44332d0
commit
02d18b3359
@ -813,9 +813,6 @@ bool ScsiController::XferOutBlockOriented(bool cont)
|
|||||||
case scsi_command::eCmdWrite6:
|
case scsi_command::eCmdWrite6:
|
||||||
case scsi_command::eCmdWrite10:
|
case scsi_command::eCmdWrite10:
|
||||||
case scsi_command::eCmdWrite16:
|
case scsi_command::eCmdWrite16:
|
||||||
// TODO Verify has to verify, not to write, see https://github.com/PiSCSI/piscsi/issues/807
|
|
||||||
case scsi_command::eCmdVerify10:
|
|
||||||
case scsi_command::eCmdVerify16:
|
|
||||||
{
|
{
|
||||||
// TODO Get rid of this special case for SCBR
|
// TODO Get rid of this special case for SCBR
|
||||||
if (auto bridge = dynamic_pointer_cast<SCSIBR>(device); bridge) {
|
if (auto bridge = dynamic_pointer_cast<SCSIBR>(device); bridge) {
|
||||||
@ -853,12 +850,29 @@ bool ScsiController::XferOutBlockOriented(bool cont)
|
|||||||
|
|
||||||
// If you do not need the next block, end here
|
// If you do not need the next block, end here
|
||||||
IncrementNext();
|
IncrementNext();
|
||||||
if (!cont) {
|
if (cont) {
|
||||||
break;
|
SetLength(disk->GetSectorSizeInBytes());
|
||||||
|
ResetOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case scsi_command::eCmdVerify10:
|
||||||
|
case scsi_command::eCmdVerify16:
|
||||||
|
{
|
||||||
|
auto disk = dynamic_pointer_cast<Disk>(device);
|
||||||
|
if (disk == nullptr) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If you do not need the next block, end here
|
||||||
|
IncrementNext();
|
||||||
|
if (cont) {
|
||||||
|
SetLength(disk->GetSectorSizeInBytes());
|
||||||
|
ResetOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
SetLength(disk->GetSectorSizeInBytes());
|
|
||||||
ResetOffset();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user