From 5863b6e0c1efb93416ff83274619e7da8a399f5e Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Tue, 22 Mar 2016 12:24:08 -0400 Subject: [PATCH] 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.) --- docs/schemas/basictypes.rng | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng index 64babaff75..e2936d87f7 100644 --- a/docs/schemas/basictypes.rng +++ b/docs/schemas/basictypes.rng @@ -282,24 +282,32 @@ - - (0x)?[0-9a-fA-F]{1,4} - + - - (0x)?[0-9a-fA-F]{1,2} - + - - (0x)?[0-1]?[0-9a-fA-F] - + + + (0x)?[0-1]?[0-9a-fA-F] + + + 0 + 31 + + - - (0x)?[0-7] - + + + (0x)?[0-7] + + + 0 + 7 + +