On a Tuesday in 2020, Peter Krempa wrote:
Similarly to previous commit split out formatting of the mdev
subsystem
related stuff.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/domain_conf.c | 42 +++++++++++++++---------------------------
1 file changed, 15 insertions(+), 27 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index facfddeea7..e9fee10e31 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -26163,6 +26163,19 @@ virDomainHostdevDefFormatSubsysSCSIHost(virBufferPtr buf,
}
+static void
+virDomainHostdevDefFormatSubsysMDEV(virBufferPtr buf,
Throughout libvirt code base, we capitalize this as 'Mdev'.
+ virDomainHostdevDefPtr def)
+{
+ g_auto(virBuffer) sourceChildBuf = VIR_BUFFER_INIT_CHILD(buf);
+ virDomainHostdevSubsysMediatedDevPtr mdevsrc = &def->source.subsys.u.mdev;
+
+ virBufferAsprintf(&sourceChildBuf, "<address
uuid='%s'/>\n", mdevsrc->uuidstr);
+
+ virXMLFormatElement(buf, "source", NULL, &sourceChildBuf);
+}
+
+
static int
virDomainHostdevDefFormatSubsys(virBufferPtr buf,
virDomainHostdevDefPtr def,
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano