--- nono/vm/scsidev.cpp 2026/04/29 17:04:53 1.1.1.9 +++ nono/vm/scsidev.cpp 2026/04/29 17:04:56 1.1.1.10 @@ -15,7 +15,8 @@ // // コンストラクタ -SCSIDevice::SCSIDevice() +SCSIDevice::SCSIDevice(const std::string& objname_) + : inherited(objname_) { } @@ -29,7 +30,8 @@ SCSIDevice::~SCSIDevice() // // コンストラクタ -SCSIHostDevice::SCSIHostDevice() +SCSIHostDevice::SCSIHostDevice(const std::string& objname_) + : inherited(objname_) { devtype = SCSI::DevType::Initiator; @@ -701,11 +703,10 @@ class SCSICmdNotSupportedCommand : publi // // コンストラクタ -SCSITarget::SCSITarget(SCSIHostDevice *h, int id, std::vector& inq) +SCSITarget::SCSITarget(const std::string& objname_, + SCSIHostDevice *h, int id, std::vector& inq) + : inherited(objname_) { - logname = "scsitarget"; - devname = "SCSITarget"; - inquiry_data = inq; // ホストへのリンク (所有関係のないポインタ) host = h; @@ -1032,9 +1033,10 @@ SCSITarget::DispatchCmd() // コンストラクタ SCSIHD::SCSIHD(SCSIHostDevice *h, int id) - : inherited(h, id, inquiry_data) + : inherited(string_format("SCSIHD%d", id), h, id, inquiry_data) { - devname = "SCSIHD"; + AddAlias(string_format("HD%d", id)); + devtype = SCSI::DevType::HD; }