diff mbox

[Xen-devel] tools: (lib)xl: remove stray uses of build_info->u.pv.{kernel, ramdisk, cmdline}

Message ID 5477f99d000d8ade8329b70df5283a5c0bf912c0.1409257521.git.ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell Aug. 28, 2014, 8:25 p.m. UTC
The commit 11dffa2359e8 "xen: pass kernel initrd to qemu" deprecated these in
favour of build_info->{kernel,ramdisk,cmdline} but missed a couple of uses.

The ARM case breaks guest boot by omitting the command line from the DTB while
the xl SXP one is mostly cosmetic.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Chunyan Liu <cyliu@suse.com>
---
 tools/libxl/libxl_arm.c |    4 ++--
 tools/libxl/xl_sxp.c    |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Julien Grall Aug. 28, 2014, 8:45 p.m. UTC | #1
Hi Ian,

On 28/08/14 16:25, Ian Campbell wrote:
> The commit 11dffa2359e8 "xen: pass kernel initrd to qemu" deprecated these in
> favour of build_info->{kernel,ramdisk,cmdline} but missed a couple of uses.
>
> The ARM case breaks guest boot by omitting the command line from the DTB while
> the xl SXP one is mostly cosmetic.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>

Regards,
Ian Campbell Aug. 28, 2014, 9:01 p.m. UTC | #2
On Thu, 2014-08-28 at 16:45 -0400, Julien Grall wrote:
> Hi Ian,
> 
> On 28/08/14 16:25, Ian Campbell wrote:
> > The commit 11dffa2359e8 "xen: pass kernel initrd to qemu" deprecated these in
> > favour of build_info->{kernel,ramdisk,cmdline} but missed a couple of uses.
> >
> > The ARM case breaks guest boot by omitting the command line from the DTB while
> > the xl SXP one is mostly cosmetic.
> >
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Reviewed-by: Julien Grall <julien.grall@linaro.org>

Thanks. Since this is blocking staging propagation I have applied
without further ado.

Ian.
diff mbox

Patch

diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 3d30242..a122e4a 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -191,8 +191,8 @@  static int make_chosen_node(libxl__gc *gc, void *fdt, bool ramdisk,
     res = fdt_begin_node(fdt, "chosen");
     if (res) return res;
 
-    if (info->u.pv.cmdline) {
-        res = fdt_property_string(fdt, "bootargs", info->u.pv.cmdline);
+    if (info->cmdline) {
+        res = fdt_property_string(fdt, "bootargs", info->cmdline);
         if (res) return res;
     }
 
diff --git a/tools/libxl/xl_sxp.c b/tools/libxl/xl_sxp.c
index 48eb608..1c98352 100644
--- a/tools/libxl/xl_sxp.c
+++ b/tools/libxl/xl_sxp.c
@@ -144,9 +144,9 @@  void printf_info_sexp(int domid, libxl_domain_config *d_config)
         break;
     case LIBXL_DOMAIN_TYPE_PV:
         printf("\t\t(linux %d)\n", 0);
-        printf("\t\t\t(kernel %s)\n", b_info->u.pv.kernel);
-        printf("\t\t\t(cmdline %s)\n", b_info->u.pv.cmdline);
-        printf("\t\t\t(ramdisk %s)\n", b_info->u.pv.ramdisk);
+        printf("\t\t\t(kernel %s)\n", b_info->kernel);
+        printf("\t\t\t(cmdline %s)\n", b_info->cmdline);
+        printf("\t\t\t(ramdisk %s)\n", b_info->ramdisk);
         printf("\t\t\t(e820_host %s)\n",
                libxl_defbool_to_string(b_info->u.pv.e820_host));
         printf("\t\t)\n");