mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: Use virDomainControllerDefNew() more
Instead of open-coding a partial version of it. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
518e70158b
commit
ac29f9396c
@ -873,9 +873,9 @@ qemuDomainFindOrCreateSCSIDiskController(virDomainObj *vm,
|
||||
|
||||
/* No SCSI controller present, for backward compatibility we
|
||||
* now hotplug a controller */
|
||||
cont = g_new0(virDomainControllerDef, 1);
|
||||
cont->type = VIR_DOMAIN_CONTROLLER_TYPE_SCSI;
|
||||
cont = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
|
||||
cont->idx = controller;
|
||||
|
||||
if (model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT)
|
||||
cont->model = qemuDomainGetSCSIControllerModel(vm->def, cont, priv->qemuCaps);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user