[PATCH v5 1/3] conf: support <dtb> tag in XML domain file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 docs/formatdomain.html.in     |    5 +++++
 docs/schemas/domaincommon.rng |    6 ++++++
 src/conf/domain_conf.c        |    4 ++++
 src/conf/domain_conf.h        |    1 +
 4 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 35b47f2..b38a668 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -232,6 +232,7 @@
     &lt;kernel&gt;/root/f8-i386-vmlinuz&lt;/kernel&gt;
     &lt;initrd&gt;/root/f8-i386-initrd&lt;/initrd&gt;
     &lt;cmdline&gt;console=ttyS0 ks=http://example.com/f8-i386/os/&lt;/cmdline&gt;
+    &lt;dtb&gt;/root/ppc.dtb&lt;/dtb&gt;
   &lt;/os&gt;
   ...</pre>
 
@@ -253,6 +254,10 @@
         the kernel (or installer) at boottime. This is often used to
         specify an alternate primary console (eg serial port), or the
         installation media source / kickstart file</dd>
+      <dt><code>dtb</code></dt>
+      <dd>The contents of this element specify the fully-qualified path
+        to the (optional) device tree binary (dtb) image in the host OS.
+        <span class="since">Since 1.0.4</span></dd>
     </dl>
 
     <h4><a name="eleemntsOSContainer">Container boot</a></h4>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index c40263c..687f026 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -367,6 +367,7 @@
             <value>g3beige</value>
             <value>mac99</value>
             <value>prep</value>
+            <value>ppce500v2</value>
           </choice>
         </attribute>
       </optional>
@@ -835,6 +836,11 @@
           <text/>
         </element>
       </optional>
+      <optional>
+        <element name="dtb">
+          <ref name="absFilePath"/>
+        </element>
+      </optional>
     </interleave>
   </define>
   <define name="osbootdev">
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 95d2ff2..0981a5e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1849,6 +1849,7 @@ void virDomainDefFree(virDomainDefPtr def)
     VIR_FREE(def->os.kernel);
     VIR_FREE(def->os.initrd);
     VIR_FREE(def->os.cmdline);
+    VIR_FREE(def->os.dtb);
     VIR_FREE(def->os.root);
     VIR_FREE(def->os.loader);
     VIR_FREE(def->os.bootloader);
@@ -10234,6 +10235,7 @@ virDomainDefParseXML(virCapsPtr caps,
         def->os.kernel = virXPathString("string(./os/kernel[1])", ctxt);
         def->os.initrd = virXPathString("string(./os/initrd[1])", ctxt);
         def->os.cmdline = virXPathString("string(./os/cmdline[1])", ctxt);
+        def->os.dtb = virXPathString("string(./os/dtb[1])", ctxt);
         def->os.root = virXPathString("string(./os/root[1])", ctxt);
         def->os.loader = virXPathString("string(./os/loader[1])", ctxt);
     }
@@ -14856,6 +14858,8 @@ virDomainDefFormatInternal(virDomainDefPtr def,
                           def->os.initrd);
     virBufferEscapeString(buf, "    <cmdline>%s</cmdline>\n",
                           def->os.cmdline);
+    virBufferEscapeString(buf, "    <dtb>%s</dtb>\n",
+                          def->os.dtb);
     virBufferEscapeString(buf, "    <root>%s</root>\n",
                           def->os.root);
 
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 0fe43c5..1c0b238 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1550,6 +1550,7 @@ struct _virDomainOSDef {
     char *kernel;
     char *initrd;
     char *cmdline;
+    char *dtb;
     char *root;
     char *loader;
     char *bootloader;
-- 
1.6.4


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]