Added special rule for testing on x86 PCs

This commit is contained in:
Uwe Seimet 2021-08-27 09:35:14 +02:00
parent 6fa5d86786
commit 6c316ef6ab
2 changed files with 9 additions and 4 deletions

View File

@ -90,10 +90,15 @@ bool SCSIBR::Init(const string&)
}
// Packet reception flag OFF
packet_enable = FALSE;
packet_enable = false;
#endif
// Not terminating on regular Linux PCs is helpful for testing
#if defined(__x86_64__) || defined(__X86__)
return true;
#else
return m_bTapEnable;
#endif
}
void SCSIBR::AddCommand(SCSIDEV::scsi_command opcode, const char* name, void (SCSIBR::*execute)(SASIDEV *))
@ -457,7 +462,7 @@ void SCSIBR::ReceivePacket()
// Store in receive buffer
if (packet_len > 0) {
packet_enable = TRUE;
packet_enable = true;
}
}
@ -481,7 +486,7 @@ void SCSIBR::GetPacketBuf(BYTE *buf)
memcpy(buf, packet_buf, len);
// Received
packet_enable = FALSE;
packet_enable = false;
}
//---------------------------------------------------------------------------

View File

@ -74,7 +74,7 @@ private:
BYTE mac_addr[6]; // MAC Addres
int packet_len; // Receive packet size
BYTE packet_buf[0x1000]; // Receive packet buffer
BOOL packet_enable; // Received packet valid
bool packet_enable; // Received packet valid
int ReadFsResult(BYTE *buf); // Read filesystem (result code)
int ReadFsOut(BYTE *buf); // Read filesystem (return data)