[Libguestfs] [PATCH] inspector: extend the OS "name" in the RELAX NG schema

Pino Toscano ptoscano at redhat.com
Mon Mar 7 18:37:06 UTC 2016


Put the definition of "name" in an own <define>, and add the missing
operating systems so far known to libguestfs.
---
 inspector/virt-inspector.rng | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng
index 8febf65..03a95e0 100644
--- a/inspector/virt-inspector.rng
+++ b/inspector/virt-inspector.rng
@@ -26,12 +26,7 @@
           <interleave>
 
             <optional><element name="root"><text/></element></optional>
-            <element name="name">
-              <choice>
-                <value>linux</value>
-                <value>windows</value>
-              </choice>
-            </element>
+            <ref name="osname"/>
             <optional><element name="arch"><text/></element></optional>
             <optional><element name="distro"><text/></element></optional>
             <optional><element name="product_name"><text/></element></optional>
@@ -61,6 +56,23 @@
     </element>
   </start>
 
+  <!-- the operating system -->
+  <define name="osname">
+    <element name="name">
+      <choice>
+        <value>dos</value>
+        <value>freebsd</value>
+        <value>hurd</value>
+        <value>linux</value>
+        <value>minix</value>
+        <value>netbsd</value>
+        <value>openbsd</value>
+        <value>windows</value>
+        <!-- "unknown" is intentionally left out -->
+      </choice>
+    </element>
+  </define>
+
   <!-- how filesystems are mounted on mount points -->
   <define name="mountpoints">
     <element name="mountpoints">
-- 
2.5.0




More information about the Libguestfs mailing list