mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/xl: reject bootloader=pygrub in case pygrub is disabled
In case Xen has been configured with "--disable-pygrub", don't accept the domain config option "bootloader=pygrub". Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
1 parent
df8852543d
commit
a8a7c33e7d
1 file changed
+9
@@ -1692,6 +1692,15 @@ void parse_config_data(const char *config_source,
|
|||||||
xlu_cfg_get_defbool(config, "acpi", &b_info->acpi, 0);
|
xlu_cfg_get_defbool(config, "acpi", &b_info->acpi, 0);
|
||||||
|
|
||||||
xlu_cfg_replace_string (config, "bootloader", &b_info->bootloader, 0);
|
xlu_cfg_replace_string (config, "bootloader", &b_info->bootloader, 0);
|
||||||
|
#ifndef HAVE_PYGRUB
|
||||||
|
if (b_info->bootloader &&
|
||||||
|
(!strcmp(b_info->bootloader, "pygrub") ||
|
||||||
|
!strcmp(b_info->bootloader, "/usr/bin/pygrub"))) {
|
||||||
|
fprintf(stderr, "ERROR: this instance of Xen has been built without support of \"pygrub\".\n");
|
||||||
|
exit(-ERROR_FAIL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (xlu_cfg_get_list_as_string_list(config, "bootloader_args",
|
switch (xlu_cfg_get_list_as_string_list(config, "bootloader_args",
|
||||||
&b_info->bootloader_args, 1)) {
|
&b_info->bootloader_args, 1)) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||