mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
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.)
This commit is contained in:
parent
8995ad1179
commit
5863b6e0c1
@ -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'>
|
||||
|
Loading…
Reference in New Issue
Block a user