mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
virDomainPCIControllerOpts: Change type of modelName to virDomainControllerPCIModelName
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
8395c909a6
commit
376bb1ebb3
@ -9722,13 +9722,15 @@ virDomainControllerDefParseXML(virDomainXMLOption *xmlopt,
|
||||
/* Other controller models don't require extra checks */
|
||||
break;
|
||||
}
|
||||
if (modelName &&
|
||||
(def->opts.pciopts.modelName
|
||||
= virDomainControllerPCIModelNameTypeFromString(modelName)) <= 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Unknown PCI controller model name '%s'"),
|
||||
modelName);
|
||||
return NULL;
|
||||
if (modelName) {
|
||||
int value;
|
||||
if ((value = virDomainControllerPCIModelNameTypeFromString(modelName)) <= 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Unknown PCI controller model name '%s'"),
|
||||
modelName);
|
||||
return NULL;
|
||||
}
|
||||
def->opts.pciopts.modelName = value;
|
||||
}
|
||||
if (chassisNr) {
|
||||
if (virStrToLong_i(chassisNr, NULL, 0,
|
||||
|
@ -724,7 +724,7 @@ struct _virDomainPCIControllerOpts {
|
||||
* <model name='ioh3420''/>
|
||||
* ...
|
||||
*/
|
||||
int modelName; /* the exact name of the device in hypervisor */
|
||||
virDomainControllerPCIModelName modelName;
|
||||
|
||||
/* the following items are attributes of the "target" subelement
|
||||
* of controller type='pci'. They are bits of configuration that
|
||||
|
@ -2456,7 +2456,7 @@ qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDef *cont,
|
||||
virDomainDef *def,
|
||||
virQEMUCaps *qemuCaps)
|
||||
{
|
||||
int *modelName = &cont->opts.pciopts.modelName;
|
||||
virDomainControllerPCIModelName *modelName = &cont->opts.pciopts.modelName;
|
||||
|
||||
/* make sure it's not already set */
|
||||
if (*modelName != VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE)
|
||||
|
Loading…
Reference in New Issue
Block a user