nodedev: add <devnode> paths

Add new <devnode> top-level <device> element, that list the associated
/dev files. Distinguish the main /dev name from symlinks with a 'type'
attribute of value 'dev' or 'symlink'.

Update a test to check XML schema, and actually add it to the test list
since it was missing.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2017-02-15 01:04:10 +04:00
committed by Michal Privoznik
parent 7f64435307
commit 0809508ed2
7 changed files with 123 additions and 1 deletions

View File

@@ -37,6 +37,12 @@
<dd>If this element is present, it names the parent device (that
is, a controller to which this node belongs).
</dd>
<dt><code>devnode</code></dt>
<dd>This node appears for each associated <code>/dev</code>
special file. A mandatory attribute <code>type</code> specify
the kind of file path, which may be either <code>dev</code> for
the main name, or <code>link</code> for additional symlinks.
</dd>
<dt><code>capability</code></dt>
<dd>This node appears for each capability that libvirt
associates with a node. A mandatory

View File

@@ -15,6 +15,22 @@
<optional>
<element name="path"><text/></element>
</optional>
<optional>
<element name="devnode">
<attribute name='type'>
<value>dev</value>
</attribute>
<text/>
</element>
</optional>
<zeroOrMore>
<element name="devnode">
<attribute name='type'>
<value>link</value>
</attribute>
<text/>
</element>
</zeroOrMore>
<optional>
<ref name="parent"/>
</optional>