--- nono/vm/v68kio.cpp 2026/04/29 17:05:38 1.1.1.3 +++ nono/vm/v68kio.cpp 2026/04/29 17:05:43 1.1.1.4 @@ -55,6 +55,7 @@ #include "virtio_block.h" #include "virtio_entropy.h" #include "virtio_net.h" +#include "virtio_scsi.h" #include "vm.h" // コンストラクタ @@ -126,8 +127,11 @@ V68kIODevice::Create() // Net if (true) { - pVirtIO[slot].reset(new BusIO_L(slot)); + try { + pVirtIO[slot].reset(new BusIO_L(slot)); + } catch (...) { } if ((bool)pVirtIO[slot] == false) { + warnx("Failed to initialize VirtIONetDevice at %s", __method__); return false; } viotable[slot] = pVirtIO[slot].get(); @@ -136,8 +140,11 @@ V68kIODevice::Create() // Entropy if (true) { - pVirtIO[slot].reset(new BusIO_L(slot)); + try { + pVirtIO[slot].reset(new BusIO_L(slot)); + } catch (...) { } if ((bool)pVirtIO[slot] == false) { + warnx("Failed to initialize VirtIOEntropyDevice at %s", __method__); return false; } viotable[slot] = pVirtIO[slot].get(); @@ -158,9 +165,23 @@ V68kIODevice::Create() continue; } - pVirtIO[slot].reset(new BusIO_L(slot, id)); + try { + pVirtIO[slot].reset(new BusIO_L(slot, id)); + } catch (...) { } if ((bool)pVirtIO[slot] == false) { - item.Err(); // ? + warnx("Failed to initialize VirtIOBlockDevice(%u) at %s", + id, __method__); + return false; + } + viotable[slot] = pVirtIO[slot].get(); + slot++; + } + + // SCSI + if (true) { + pVirtIO[slot].reset(new BusIO_L(slot)); + if ((bool)pVirtIO[slot] == false) { + warnx("Failed to initialize VirtIOSCSIDevice at %s", __method__); return false; } viotable[slot] = pVirtIO[slot].get();