]> xenbits.xensource.com Git - libvirt.git/commitdiff
schema: make pci slot and function optional
authorLaine Stump <laine@laine.org>
Tue, 22 Mar 2016 15:38:53 +0000 (11:38 -0400)
committerLaine Stump <laine@laine.org>
Thu, 14 Apr 2016 18:00:33 +0000 (14:00 -0400)
The pcie-switch-downstream-port and pcie-root-port controllers have
only a single slot, numbered 0, and the greate majority of all guest
PCI devices are plugged into function 0 of whatever slot they're
using. The parser makes these optional, setting them to 0 when not
specified, and it's logical for the schema to also make them optional.

docs/schemas/basictypes.rng

index a83063afcc7f529693d4f1124ec2d41f147c32dc..084d4033e7c579110232920d4186952a5a83bffa 100644 (file)
     <attribute name="bus">
       <ref name="pciBus"/>
     </attribute>
-    <attribute name="slot">
-      <ref name="pciSlot"/>
-    </attribute>
-    <attribute name="function">
-      <ref name="pciFunc"/>
-    </attribute>
+    <optional>
+      <attribute name="slot">
+        <ref name="pciSlot"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="function">
+        <ref name="pciFunc"/>
+      </attribute>
+    </optional>
     <optional>
       <attribute name="multifunction">
         <ref name="virOnOff"/>