--- nono/vm/scsidomain.cpp 2026/04/29 17:05:42 1.1 +++ nono/vm/scsidomain.cpp 2026/04/29 17:05:59 1.1.1.3 @@ -49,14 +49,16 @@ #include "monitor.h" // コンストラクタ -SCSIDomain::SCSIDomain(IODevice *parent_, const char *config_name_) +SCSIDomain::SCSIDomain(IODevice *parent_, + const char *domain_name_, const char *config_name_) : inherited(OBJ_SCSI) { parent = parent_; + domain_name = domain_name_; config_name = config_name_; monitor = gMonitorManager->Regist(ID_MONITOR_SCSIDEVS, this); - monitor->func = ToMonitorCallback(&SCSIDomain::MonitorUpdate); + monitor->SetCallback(&SCSIDomain::MonitorScreen); // サイズは Create で決まる } @@ -149,7 +151,7 @@ SCSIDomain::Init() if (loglevel >= 1) { const auto& conn = GetConnectedDevices(); for (const auto dev : conn) { - putmsgn("%s target #%u %s", config_name, dev->GetMyID(), + putmsgn("%s target #%u %s", domain_name, dev->GetMyID(), SCSI::GetDevTypeName(dev->GetDevType())); } } @@ -163,7 +165,7 @@ void SCSIDomain::AttachTargets(SCSIBus *bus) { for (uint id = 0; id < MaxDevices; id++) { - if (target[id]) { + if ((bool)target[id]) { target[id]->Attach(bus); } } @@ -248,7 +250,7 @@ SCSIDomain::GetTargetCount() const // (どこでやるのがいいか分からんけど、SCSI デバイスを一括して表示したいので // とりあえずここで) void -SCSIDomain::MonitorUpdate(Monitor *, TextScreen& screen) +SCSIDomain::MonitorScreen(Monitor *, TextScreen& screen) { int y;