mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 11:04:58 -06:00
scsi: Report error when lun number is in use
In the case that the lun number is taken by another scsi device, don't release the existing device siliently, but report an error to user. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ab6d3749c4
commit
2039511b8f
1 changed files with 2 additions and 1 deletions
|
@ -177,7 +177,8 @@ static int scsi_qdev_init(DeviceState *qdev)
|
|||
d = scsi_device_find(bus, dev->channel, dev->id, dev->lun);
|
||||
assert(d);
|
||||
if (d->lun == dev->lun && dev != d) {
|
||||
object_unparent(OBJECT(d));
|
||||
error_report("lun already used by '%s'", d->qdev.id);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue