提交 d7d468f0 编写于 作者: G Guannan Ren

qemu:rename qemuCheckScsiControllerModel function

上级 41185927
...@@ -469,9 +469,9 @@ static int qemuAssignDeviceDiskAliasFixed(virDomainDiskDefPtr disk) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册