Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Aug 27, 2023
1 parent 983f8ac commit 818b77c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpp/controllers/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SCSI Target Emulator PiSCSI
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet
// Copyright (C) 2022-2023 Uwe Seimet
//
//---------------------------------------------------------------------------

Expand All @@ -21,12 +21,12 @@ bool ControllerManager::AttachToScsiController(int id, shared_ptr<PrimaryDevice>
return controller->AddDevice(device);
}

// If there is no LUN yet the first LUN must be LUN 0
// If this the first LUN, i.e. LUN 0, create a new controller
if (device->GetLun() == 0) {
controller = make_shared<ScsiController>(shared_from_this(), id);
auto new_controller = make_shared<ScsiController>(shared_from_this(), id);

if (controller->AddDevice(device)) {
controllers[id] = controller;
if (new_controller->AddDevice(device)) {
controllers[id] = new_controller;

return true;
}
Expand Down

0 comments on commit 818b77c

Please sign in to comment.