[Libosinfo] [osinfo-db PATCH 1/4] schema: Add firmware support to <os/>

Fabiano Fidêncio fidencio at redhat.com
Tue May 7 13:06:18 UTC 2019


Let's add the <firmware/> attribute to <os/> so OSes can express whether
they support efi, bios and for which architecture those are supported.

The XML will look like:
<os>
  <firmware arch='all|x86_64|armv7l' type='bios|efi' supported='true|false'/>
</os>

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 data/schema/osinfo.rng.in | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/data/schema/osinfo.rng.in b/data/schema/osinfo.rng.in
index b3760d2..58c9289 100644
--- a/data/schema/osinfo.rng.in
+++ b/data/schema/osinfo.rng.in
@@ -577,6 +577,22 @@
     </element>
   </define>
 
+  <define name='firmware'>
+    <element name='firmware'>
+      <attribute name='arch'>
+        <ref name='archnames'/>
+      </attribute>
+      <attribute name='type'>
+        <ref name='firmware-types'/>
+      </attribute>
+      <optional>
+        <attribute name='supported'>
+          <ref name='bool'/>
+        </attribute>
+      </optional>
+    </element>
+  </define>
+
   <define name='os'>
     <element name='os'>
       <interleave>
@@ -611,6 +627,9 @@
         <zeroOrMore>
           <ref name='driver'/>
         </zeroOrMore>
+        <zeroOrMore>
+          <ref name='firmware'/>
+        </zeroOrMore>
       </interleave>
     </element>
   </define>
@@ -896,4 +915,11 @@
       </data>
     </element>
   </define>
+
+  <define name='firmware-types'>
+    <choice>
+      <value>bios</value>
+      <value>efi</value>
+    </choice>
+  </define>
 </grammar>
-- 
2.21.0




More information about the Libosinfo mailing list