aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_bootloader.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-04-19 09:16:24 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-04-19 09:16:24 +0100
commit0cb2a574211b9055790116a9066ebc3acbbba7e7 (patch)
tree56b1920fe7152d5ed639b9286a90c8b995f87bd0 /tools/libxl/libxl_bootloader.c
parentff38d3faa7d0e1734237e81c2fea95e18c510dcd (diff)
downloadxen-0cb2a574211b9055790116a9066ebc3acbbba7e7.tar.gz
xen-0cb2a574211b9055790116a9066ebc3acbbba7e7.tar.bz2
xen-0cb2a574211b9055790116a9066ebc3acbbba7e7.zip
tools: libxl: hide selection of hvmloader by default.
This should never have been exposed to users as something they are required to think about, unless they want to. At the libxl API level: * Move libxl_domain_build_info.kernel into the PV side of the tagged union (using this field to specify both PV kernel and hvmloader is confusing) * Add hvmloader (a string) to the HVM side of the tagged union. This defaults to NULL and libxl will DTRT with that default but still allow libxl users to specify something explicit if they want. At the xl level: * WARN if an HVM guest cfg uses the "kernel" config option, and direct users to the "hvmloader_override" option if they really do not want the default hvmloader. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_bootloader.c')
-rw-r--r--tools/libxl/libxl_bootloader.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c
index 133a11e486..3eb0343bf9 100644
--- a/tools/libxl/libxl_bootloader.c
+++ b/tools/libxl/libxl_bootloader.c
@@ -44,8 +44,9 @@ static char **make_bootloader_args(libxl__gc *gc,
flexarray_set(args, nr++, (char *)info->u.pv.bootloader);
- if (info->kernel.path)
- flexarray_set(args, nr++, libxl__sprintf(gc, "--kernel=%s", info->kernel.path));
+ if (info->u.pv.kernel.path)
+ flexarray_set(args, nr++, libxl__sprintf(gc, "--kernel=%s",
+ info->u.pv.kernel.path));
if (info->u.pv.ramdisk.path)
flexarray_set(args, nr++, libxl__sprintf(gc, "--ramdisk=%s", info->u.pv.ramdisk.path));
if (info->u.pv.cmdline && *info->u.pv.cmdline != '\0')
@@ -277,10 +278,10 @@ static void parse_bootloader_result(libxl__gc *gc,
{
while (*o != '\0') {
if (strncmp("kernel ", o, strlen("kernel ")) == 0) {
- free(info->kernel.path);
- info->kernel.path = strdup(o + strlen("kernel "));
- libxl__file_reference_map(&info->kernel);
- unlink(info->kernel.path);
+ free(info->u.pv.kernel.path);
+ info->u.pv.kernel.path = strdup(o + strlen("kernel "));
+ libxl__file_reference_map(&info->u.pv.kernel);
+ unlink(info->u.pv.kernel.path);
} else if (strncmp("ramdisk ", o, strlen("ramdisk ")) == 0) {
free(info->u.pv.ramdisk.path);
info->u.pv.ramdisk.path = strdup(o + strlen("ramdisk "));