提交 5863b6e0 编写于 作者: L Laine Stump

schema: allow pci address attributes to be in decimal

This is especially useful for "bus", since the bus of a device's pci
address is matched to the "index" of a controller to determine which
bus it will be connected to, and "index" is always specified in
decimal - being able to specify both in decimal at least makes it
easier to assure a device is being assigned to the correct bus when it
is added. For the other attributes, it is just a convenience.

(MB: the parser already allows for any of these attributes to be given
in decimal, and there are even examples floating around on the
internet that give them in decimal rather than hex (written in the
days before virsh did schema validation on all XML). This only updates
the schema to match the parser.)
上级 8995ad11
......@@ -282,24 +282,32 @@
</define>
<define name="pciDomain">
<data type="string">
<param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
</data>
<ref name="uint16"/>
</define>
<define name="pciBus">
<data type="string">
<param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
</data>
<ref name="uint8"/>
</define>
<define name="pciSlot">
<data type="string">
<param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
</data>
<choice>
<data type="string">
<param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
</data>
<data type="int">
<param name="minInclusive">0</param>
<param name="maxInclusive">31</param>
</data>
</choice>
</define>
<define name="pciFunc">
<data type="string">
<param name="pattern">(0x)?[0-7]</param>
</data>
<choice>
<data type="string">
<param name="pattern">(0x)?[0-7]</param>
</data>
<data type="int">
<param name="minInclusive">0</param>
<param name="maxInclusive">7</param>
</data>
</choice>
</define>
<define name='wwn'>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册