mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
qemuBuildVirtioDevGetConfig: Split up formatting of bus suffix
Add the bus suffix in a separate call. This will make it more obvious what's happening in the next commit. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
927f189a36
commit
95c8d0b21e
@ -815,6 +815,10 @@ qemuBuildVirtioDevGetConfig(virDomainDeviceDef *device,
|
||||
*disableLegacy = VIR_TRISTATE_SWITCH_ABSENT;
|
||||
*disableModern = VIR_TRISTATE_SWITCH_ABSENT;
|
||||
|
||||
qemuBuildVirtioDevGetConfigDev(device, &has_tmodel, &has_ntmodel);
|
||||
|
||||
virBufferAdd(&buf, baseName, -1);
|
||||
|
||||
switch ((virDomainDeviceAddressType) info->type) {
|
||||
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI:
|
||||
implName = "pci";
|
||||
@ -848,9 +852,7 @@ qemuBuildVirtioDevGetConfig(virDomainDeviceDef *device,
|
||||
return -1;
|
||||
}
|
||||
|
||||
virBufferAsprintf(&buf, "%s-%s", baseName, implName);
|
||||
|
||||
qemuBuildVirtioDevGetConfigDev(device, &has_tmodel, &has_ntmodel);
|
||||
virBufferAsprintf(&buf, "-%s", implName);
|
||||
|
||||
if (has_tmodel || has_ntmodel) {
|
||||
if (info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user