mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-10 02:29:33 +00:00
Add LUN check
This commit is contained in:
parent
6e82e6b9f5
commit
e7755a4c40
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user