mirror of https://gitee.com/openkylin/libvirt.git
qemu: Drop qemuDomainSetSCSIControllerModel()
It only has a single caller. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
7d6ec89243
commit
27cb524a9f
|
@ -5586,7 +5586,9 @@ qemuDomainControllerDefPostParse(virDomainControllerDef *cont,
|
|||
switch (cont->type) {
|
||||
case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
|
||||
/* Set the default SCSI controller model if not already set */
|
||||
if (qemuDomainSetSCSIControllerModel(def, cont, qemuCaps) < 0)
|
||||
cont->model = qemuDomainGetSCSIControllerModel(def, cont, qemuCaps);
|
||||
|
||||
if (cont->model < 0)
|
||||
return -1;
|
||||
break;
|
||||
|
||||
|
|
|
@ -74,31 +74,6 @@ qemuDomainGetSCSIControllerModel(const virDomainDef *def,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @def: Domain definition
|
||||
* @cont: Domain controller def
|
||||
* @qemuCaps: qemu capabilities
|
||||
*
|
||||
* Set the controller model based on the existing value and the
|
||||
* capabilities if possible.
|
||||
*
|
||||
* Returns 0 on success, -1 on failure with error set.
|
||||
*/
|
||||
int
|
||||
qemuDomainSetSCSIControllerModel(const virDomainDef *def,
|
||||
virDomainControllerDef *cont,
|
||||
virQEMUCaps *qemuCaps)
|
||||
{
|
||||
int model = qemuDomainGetSCSIControllerModel(def, cont, qemuCaps);
|
||||
|
||||
if (model < 0)
|
||||
return -1;
|
||||
|
||||
cont->model = model;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainAssignVirtioSerialAddresses(virDomainDef *def)
|
||||
{
|
||||
|
|
|
@ -28,10 +28,6 @@ int qemuDomainGetSCSIControllerModel(const virDomainDef *def,
|
|||
const virDomainControllerDef *cont,
|
||||
virQEMUCaps *qemuCaps);
|
||||
|
||||
int qemuDomainSetSCSIControllerModel(const virDomainDef *def,
|
||||
virDomainControllerDef *cont,
|
||||
virQEMUCaps *qemuCaps);
|
||||
|
||||
int qemuDomainAssignAddresses(virDomainDef *def,
|
||||
virQEMUCaps *qemuCaps,
|
||||
virQEMUDriver *driver,
|
||||
|
|
Loading…
Reference in New Issue