conf: Move virDomainControllerModelTypeToString

Move virDomainControllerModelTypeToString closer to it's counterpart
virDomainControllerModelTypeFromString.

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2016-04-21 09:27:01 -04:00
parent d32a2f25bf
commit a3aa2005f8

View File

@ -7813,6 +7813,22 @@ virDomainControllerModelTypeFromString(const virDomainControllerDef *def,
return -1;
}
static const char *
virDomainControllerModelTypeToString(virDomainControllerDefPtr def,
int model)
{
if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI)
return virDomainControllerModelSCSITypeToString(model);
else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_USB)
return virDomainControllerModelUSBTypeToString(model);
else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI)
return virDomainControllerModelPCITypeToString(model);
return NULL;
}
/* Parse the XML definition for a controller
* @param node XML nodeset to parse for controller definition
*/
@ -19402,19 +19418,6 @@ virDomainDiskDefFormat(virBufferPtr buf,
return 0;
}
static const char *
virDomainControllerModelTypeToString(virDomainControllerDefPtr def,
int model)
{
if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI)
return virDomainControllerModelSCSITypeToString(model);
else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_USB)
return virDomainControllerModelUSBTypeToString(model);
else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI)
return virDomainControllerModelPCITypeToString(model);
return NULL;
}
static int
virDomainControllerDefFormat(virBufferPtr buf,