mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 06:25:19 +00:00
qemu:rename qemuCheckScsiControllerModel function
This commit is contained in:
parent
4118592786
commit
d7d468f02c
@ -469,9 +469,9 @@ static int qemuAssignDeviceDiskAliasFixed(virDomainDiskDefPtr disk)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuCheckScsiControllerModel(virDomainDefPtr def,
|
qemuSetScsiControllerModel(virDomainDefPtr def,
|
||||||
virBitmapPtr qemuCaps,
|
virBitmapPtr qemuCaps,
|
||||||
int *model)
|
int *model)
|
||||||
{
|
{
|
||||||
if (*model > 0) {
|
if (*model > 0) {
|
||||||
switch (*model) {
|
switch (*model) {
|
||||||
@ -531,7 +531,7 @@ qemuAssignDeviceDiskAliasCustom(virDomainDefPtr def,
|
|||||||
virDomainDiskFindControllerModel(def, disk,
|
virDomainDiskFindControllerModel(def, disk,
|
||||||
VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
|
VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
|
||||||
|
|
||||||
if ((qemuCheckScsiControllerModel(def, qemuCaps, &controllerModel)) < 0)
|
if ((qemuSetScsiControllerModel(def, qemuCaps, &controllerModel)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -919,7 +919,7 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
|
|||||||
for (i = 0 ; i < def->ncontrollers; i++) {
|
for (i = 0 ; i < def->ncontrollers; i++) {
|
||||||
model = def->controllers[i]->model;
|
model = def->controllers[i]->model;
|
||||||
if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI) {
|
if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI) {
|
||||||
rc = qemuCheckScsiControllerModel(def, qemuCaps, &model);
|
rc = qemuSetScsiControllerModel(def, qemuCaps, &model);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -2489,7 +2489,7 @@ qemuBuildDriveDevStr(virDomainDefPtr def,
|
|||||||
controllerModel =
|
controllerModel =
|
||||||
virDomainDiskFindControllerModel(def, disk,
|
virDomainDiskFindControllerModel(def, disk,
|
||||||
VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
|
VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
|
||||||
if ((qemuCheckScsiControllerModel(def, qemuCaps, &controllerModel)) < 0)
|
if ((qemuSetScsiControllerModel(def, qemuCaps, &controllerModel)) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (controllerModel == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC) {
|
if (controllerModel == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC) {
|
||||||
@ -2819,7 +2819,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
|
|||||||
switch (def->type) {
|
switch (def->type) {
|
||||||
case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
|
case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
|
||||||
model = def->model;
|
model = def->model;
|
||||||
if ((qemuCheckScsiControllerModel(domainDef, qemuCaps, &model)) < 0)
|
if ((qemuSetScsiControllerModel(domainDef, qemuCaps, &model)) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
switch (model) {
|
switch (model) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user