From 9545acd9f0c3b5acccadfb565536930562fd8583 Mon Sep 17 00:00:00 2001 From: Olivia Yin Date: Thu, 14 Mar 2013 12:49:42 +0800 Subject: [PATCH] conf: support tag in XML domain file --- 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(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 8a3c3b7686..e83bdd0649 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -232,6 +232,7 @@ <kernel>/root/f8-i386-vmlinuz</kernel> <initrd>/root/f8-i386-initrd</initrd> <cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline> + <dtb>/root/ppc.dtb</dtb> </os> ... @@ -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 +
dtb
+
The contents of this element specify the fully-qualified path + to the (optional) device tree binary (dtb) image in the host OS. + Since 1.0.4

Container boot

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 97920653df..90647df7a6 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -367,6 +367,7 @@ g3beige mac99 prep + ppce500v2 @@ -835,6 +836,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3278e9c15e..a1cfc763e8 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); @@ -10247,6 +10248,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); } @@ -14875,6 +14877,8 @@ virDomainDefFormatInternal(virDomainDefPtr def, def->os.initrd); virBufferEscapeString(buf, " %s\n", def->os.cmdline); + virBufferEscapeString(buf, " %s\n", + def->os.dtb); virBufferEscapeString(buf, " %s\n", def->os.root); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 96f11ba76d..bfc37a06a9 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; -- 2.47.2