mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-02-03 15:32:36 +00:00
scsibus: Check for invalid target_id.
This commit is contained in:
parent
2c79171be6
commit
bc691a9d86
@ -286,12 +286,22 @@ int ScsiBus::target_xfer_data() {
|
||||
|
||||
void ScsiBus::target_next_step()
|
||||
{
|
||||
this->devices[this->target_id]->next_step();
|
||||
if (target_id < 0) {
|
||||
LOG_F(ERROR, "%s: target_id is not set yet.", this->get_name().c_str());
|
||||
}
|
||||
else {
|
||||
this->devices[this->target_id]->next_step();
|
||||
}
|
||||
}
|
||||
|
||||
bool ScsiBus::negotiate_xfer(int& bytes_in, int& bytes_out)
|
||||
{
|
||||
this->devices[this->target_id]->prepare_xfer(this, bytes_in, bytes_out);
|
||||
if (target_id < 0) {
|
||||
LOG_F(ERROR, "%s: target_id is not set yet.", this->get_name().c_str());
|
||||
}
|
||||
else {
|
||||
this->devices[this->target_id]->prepare_xfer(this, bytes_in, bytes_out);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user