tools: (lib)xl: remove stray uses of build_info->u.pv.{kernel, ramdisk, cmdline}
authorIan Campbell <ian.campbell@citrix.com>
Thu, 28 Aug 2014 20:25:21 +0000 (21:25 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 28 Aug 2014 20:48:20 +0000 (21:48 +0100)
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>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
tools/libxl/libxl_arm.c
tools/libxl/xl_sxp.c

index 3d3024209e995d33b84fff6076db0f32b69ae6f2..a122e4aac616e56fe839648ae452731d1ec2c593 100644 (file)
@@ -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;
     }
 
index 48eb6083863f39d9bdb8396736f58b5a821c2f74..1c983524d88303c3d637ce4c2cf669007b7f696b 100644 (file)
@@ -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");