mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-09 13:11:36 +00:00
Split out virDomainIOMMUDefFormat
Make adding subelements easier.
This commit is contained in:
parent
123770cd4e
commit
d34ac94351
@ -23989,6 +23989,15 @@ virDomainDefIothreadShouldFormat(virDomainDefPtr def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
virDomainIOMMUDefFormat(virBufferPtr buf,
|
||||||
|
const virDomainIOMMUDef *iommu)
|
||||||
|
{
|
||||||
|
virBufferAsprintf(buf, "<iommu model='%s'/>\n",
|
||||||
|
virDomainIOMMUModelTypeToString(iommu->model));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* This internal version appends to an existing buffer
|
/* This internal version appends to an existing buffer
|
||||||
* (possibly with auto-indent), rather than flattening
|
* (possibly with auto-indent), rather than flattening
|
||||||
* to string.
|
* to string.
|
||||||
@ -24735,10 +24744,8 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (def->iommu) {
|
if (def->iommu)
|
||||||
virBufferAsprintf(buf, "<iommu model='%s'/>\n",
|
virDomainIOMMUDefFormat(buf, def->iommu);
|
||||||
virDomainIOMMUModelTypeToString(def->iommu->model));
|
|
||||||
}
|
|
||||||
|
|
||||||
virBufferAdjustIndent(buf, -2);
|
virBufferAdjustIndent(buf, -2);
|
||||||
virBufferAddLit(buf, "</devices>\n");
|
virBufferAddLit(buf, "</devices>\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user