mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-21 18:30:20 +00:00
Disable SCSIRead() if no buffer provided. Some commands, like TEST_UNIT, don't read data from device
This commit is contained in:
parent
1153cd593a
commit
5feb420909
@ -71,11 +71,14 @@ int scsi_command(int target, char* cdb, int count, TIB_t* tib)
|
||||
goto complete;
|
||||
}
|
||||
|
||||
err = SCSIRead(tib);
|
||||
if ((err != scPhaseErr) && (err != noErr))
|
||||
if (tib != NULL)
|
||||
{
|
||||
printf("Cannot read data (%d)\n", err);
|
||||
goto complete;
|
||||
err = SCSIRead(tib);
|
||||
if ((err != scPhaseErr) && (err != noErr))
|
||||
{
|
||||
printf("Cannot read data (%d)\n", err);
|
||||
goto complete;
|
||||
}
|
||||
}
|
||||
|
||||
complete:
|
||||
|
Loading…
Reference in New Issue
Block a user