Add LUN check

This commit is contained in:
Uwe Seimet 2023-10-01 19:46:15 +02:00
parent 6e82e6b9f5
commit e7755a4c40

View File

@ -21,6 +21,10 @@ shared_ptr<ScsiController> ControllerManager::CreateScsiController(BUS& bus, int
bool ControllerManager::AttachToController(BUS& bus, int id, shared_ptr<PrimaryDevice> device)
{
if (auto controller = FindController(id); controller != nullptr) {
if (controller->HasDeviceForLun(device->GetLun())) {
return false;
}
return controller->AddDevice(device);
}