Revision 33e66b86 hw/scsi-bus.c
b/hw/scsi-bus.c | ||
---|---|---|
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
/* handle legacy '-drive if=scsi,...' cmd line args */ |
85 |
/* FIXME callers should check for failure, but don't */ |
|
85 | 86 |
SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, DriveInfo *dinfo, int unit) |
86 | 87 |
{ |
87 | 88 |
const char *driver; |
... | ... | |
91 | 92 |
dev = qdev_create(&bus->qbus, driver); |
92 | 93 |
qdev_prop_set_uint32(dev, "scsi-id", unit); |
93 | 94 |
qdev_prop_set_drive(dev, "drive", dinfo); |
94 |
qdev_init(dev); |
|
95 |
if (qdev_init(dev) < 0) |
|
96 |
return NULL; |
|
95 | 97 |
return DO_UPCAST(SCSIDevice, qdev, dev); |
96 | 98 |
} |
97 | 99 |
|
Also available in: Unified diff