mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
conf: domcaps: Report device <filesystem>
Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
a7b0026e46
commit
f388aa5ff3
@ -518,6 +518,34 @@
|
||||
</dl>
|
||||
|
||||
|
||||
<h4><a id="elementsFilesystem">Filesystem device</a></h4>
|
||||
<p>Filesystem device capabilities are exposed under the
|
||||
<code>filesystem</code> element. For instance:</p>
|
||||
|
||||
<pre>
|
||||
<domainCapabilities>
|
||||
...
|
||||
<devices>
|
||||
<filesystem supported='yes'>
|
||||
<enum name='driverType'>
|
||||
<value>default</value>
|
||||
<value>path</value>
|
||||
<value>handle</value>
|
||||
<value>virtiofs</value>
|
||||
</enum>
|
||||
</filesystem>
|
||||
...
|
||||
</devices>
|
||||
</domainCapabilities>
|
||||
</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>driverType</code></dt>
|
||||
<dd>Options for the <code>type</code> attribute of the
|
||||
<filesystem><driver> element.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3><a id="elementsFeatures">Features</a></h3>
|
||||
|
||||
<p>One more set of XML elements describe the supported features and
|
||||
|
@ -182,6 +182,9 @@
|
||||
<optional>
|
||||
<ref name="rng"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="filesystem"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -220,6 +223,13 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="filesystem">
|
||||
<element name="filesystem">
|
||||
<ref name="supported"/>
|
||||
<ref name="enum"/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="features">
|
||||
<element name="features">
|
||||
<optional>
|
||||
|
@ -524,6 +524,18 @@ virDomainCapsDeviceRNGFormat(virBuffer *buf,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
virDomainCapsDeviceFilesystemFormat(virBuffer *buf,
|
||||
const virDomainCapsDeviceFilesystem *filesystem)
|
||||
{
|
||||
FORMAT_PROLOGUE(filesystem);
|
||||
|
||||
ENUM_PROCESS(filesystem, driverType, virDomainFSDriverTypeToString);
|
||||
|
||||
FORMAT_EPILOGUE(filesystem);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virDomainCapsFeatureGICFormat:
|
||||
* @buf: target buffer
|
||||
@ -628,6 +640,7 @@ virDomainCapsFormat(const virDomainCaps *caps)
|
||||
virDomainCapsDeviceVideoFormat(&buf, &caps->video);
|
||||
virDomainCapsDeviceHostdevFormat(&buf, &caps->hostdev);
|
||||
virDomainCapsDeviceRNGFormat(&buf, &caps->rng);
|
||||
virDomainCapsDeviceFilesystemFormat(&buf, &caps->filesystem);
|
||||
|
||||
virBufferAdjustIndent(&buf, -2);
|
||||
virBufferAddLit(&buf, "</devices>\n");
|
||||
|
@ -113,6 +113,13 @@ struct _virDomainCapsDeviceRNG {
|
||||
virDomainCapsEnum backendModel; /* virDomainRNGBackend */
|
||||
};
|
||||
|
||||
STATIC_ASSERT_ENUM(VIR_DOMAIN_FS_DRIVER_TYPE_LAST);
|
||||
typedef struct _virDomainCapsDeviceFilesystem virDomainCapsDeviceFilesystem;
|
||||
struct _virDomainCapsDeviceFilesystem {
|
||||
virTristateBool supported;
|
||||
virDomainCapsEnum driverType; /* virDomainFSDriverType */
|
||||
};
|
||||
|
||||
STATIC_ASSERT_ENUM(VIR_GIC_VERSION_LAST);
|
||||
typedef struct _virDomainCapsFeatureGIC virDomainCapsFeatureGIC;
|
||||
struct _virDomainCapsFeatureGIC {
|
||||
@ -194,6 +201,7 @@ struct _virDomainCaps {
|
||||
virDomainCapsDeviceVideo video;
|
||||
virDomainCapsDeviceHostdev hostdev;
|
||||
virDomainCapsDeviceRNG rng;
|
||||
virDomainCapsDeviceFilesystem filesystem;
|
||||
/* add new domain devices here */
|
||||
|
||||
virDomainCapsFeatureGIC gic;
|
||||
|
Loading…
Reference in New Issue
Block a user