mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
qemu: Drop qemuDomainFindSCSIControllerModel()
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
d0087e65d8
commit
7d6ec89243
@ -214,8 +214,17 @@ qemuAssignDeviceDiskAlias(virDomainDef *def,
|
|||||||
if (!disk->info.alias) {
|
if (!disk->info.alias) {
|
||||||
if (disk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) {
|
if (disk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) {
|
||||||
if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI) {
|
if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI) {
|
||||||
controllerModel = qemuDomainFindSCSIControllerModel(def,
|
virDomainControllerDef *cont;
|
||||||
&disk->info);
|
|
||||||
|
if (!(cont = virDomainDeviceFindSCSIController(def, &disk->info.addr.drive))) {
|
||||||
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("unable to find a SCSI controller for idx=%1$d"),
|
||||||
|
disk->info.addr.drive.controller);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
controllerModel = cont->model;
|
||||||
|
|
||||||
if (controllerModel < 0)
|
if (controllerModel < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -99,32 +99,6 @@ qemuDomainSetSCSIControllerModel(const virDomainDef *def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @def: Domain definition
|
|
||||||
* @info: Domain device info
|
|
||||||
*
|
|
||||||
* Using the device info, find the controller related to the
|
|
||||||
* device by index and use that controller to return the model.
|
|
||||||
*
|
|
||||||
* Returns the model if found, -1 if not with an error message set
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
qemuDomainFindSCSIControllerModel(const virDomainDef *def,
|
|
||||||
virDomainDeviceInfo *info)
|
|
||||||
{
|
|
||||||
virDomainControllerDef *cont;
|
|
||||||
|
|
||||||
if (!(cont = virDomainDeviceFindSCSIController(def, &info->addr.drive))) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("unable to find a SCSI controller for idx=%1$d"),
|
|
||||||
info->addr.drive.controller);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return cont->model;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainAssignVirtioSerialAddresses(virDomainDef *def)
|
qemuDomainAssignVirtioSerialAddresses(virDomainDef *def)
|
||||||
{
|
{
|
||||||
|
@ -32,9 +32,6 @@ int qemuDomainSetSCSIControllerModel(const virDomainDef *def,
|
|||||||
virDomainControllerDef *cont,
|
virDomainControllerDef *cont,
|
||||||
virQEMUCaps *qemuCaps);
|
virQEMUCaps *qemuCaps);
|
||||||
|
|
||||||
int qemuDomainFindSCSIControllerModel(const virDomainDef *def,
|
|
||||||
virDomainDeviceInfo *info);
|
|
||||||
|
|
||||||
int qemuDomainAssignAddresses(virDomainDef *def,
|
int qemuDomainAssignAddresses(virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps,
|
virQEMUCaps *qemuCaps,
|
||||||
virQEMUDriver *driver,
|
virQEMUDriver *driver,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user