[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH 3/3] xl/create: Sprinkle the check to silence warnings further.
We have now the parameter --ignore-warn which will silence the warnings. Originally it was only for vCPUs but it might as well be a blanket operation and silence all of the warnings. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 49 +++++++++++++++++++++++++-------------------- 1 files changed, 27 insertions(+), 22 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index b83676c..e91936f 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -783,13 +783,14 @@ static void parse_config_data(const char *config_source, xlu_cfg_get_defbool(config, "nomigrate", &b_info->disable_migrate, 0); if (!xlu_cfg_get_long(config, "tsc_mode", &l, 1)) { - const char *s = libxl_tsc_mode_to_string(l); - fprintf(stderr, "WARNING: specifying \"tsc_mode\" as an integer is deprecated. " - "Please use the named parameter variant. %s%s%s\n", - s ? "e.g. tsc_mode=\"" : "", - s ? s : "", - s ? "\"" : ""); - + if (dom_info && !dom_info->ignore_warn) { + const char *s = libxl_tsc_mode_to_string(l); + fprintf(stderr, "WARNING: specifying \"tsc_mode\" as an integer is deprecated. " + "Please use the named parameter variant. %s%s%s\n", + s ? "e.g. tsc_mode=\"" : "", + s ? s : "", + s ? "\"" : ""); + } if (l < LIBXL_TSC_MODE_DEFAULT || l > LIBXL_TSC_MODE_NATIVE_PARAVIRT) { fprintf(stderr, "ERROR: invalid value %ld for \"tsc_mode\"\n", l); @@ -822,7 +823,8 @@ static void parse_config_data(const char *config_source, switch(b_info->type) { case LIBXL_DOMAIN_TYPE_HVM: - if (!xlu_cfg_get_string (config, "kernel", &buf, 0)) + if (!xlu_cfg_get_string (config, "kernel", &buf, 0) && dom_info && + !dom_info->ignore_warn) fprintf(stderr, "WARNING: ignoring \"kernel\" directive for HVM guest. " "Use \"firmware_override\" instead if you really want a non-default firmware\n"); @@ -846,13 +848,14 @@ static void parse_config_data(const char *config_source, xlu_cfg_get_defbool(config, "vpt_align", &b_info->u.hvm.vpt_align, 0); if (!xlu_cfg_get_long(config, "timer_mode", &l, 1)) { - const char *s = libxl_timer_mode_to_string(l); - fprintf(stderr, "WARNING: specifying \"timer_mode\" as an integer is deprecated. " - "Please use the named parameter variant. %s%s%s\n", - s ? "e.g. timer_mode=\"" : "", - s ? s : "", - s ? "\"" : ""); - + if (dom_info && !dom_info->ignore_warn) { + const char *s = libxl_timer_mode_to_string(l); + fprintf(stderr, "WARNING: specifying \"timer_mode\" as an integer is deprecated. " + "Please use the named parameter variant. %s%s%s\n", + s ? "e.g. timer_mode=\"" : "", + s ? s : "", + s ? "\"" : ""); + } if (l < LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS || l > LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING) { fprintf(stderr, "ERROR: invalid value %ld for \"timer_mode\"\n", l); @@ -905,10 +908,10 @@ static void parse_config_data(const char *config_source, case ESRCH: break; /* Option not present */ case EINVAL: if (!xlu_cfg_get_string(config, "bootloader_args", &buf, 0)) { - - fprintf(stderr, "WARNING: Specifying \"bootloader_args\"" - " as a string is deprecated. " - "Please use a list of arguments.\n"); + if (dom_info && !dom_info->ignore_warn) + fprintf(stderr, "WARNING: Specifying \"bootloader_args\"" + " as a string is deprecated. " + "Please use a list of arguments.\n"); split_string_into_string_list(buf, " \t\n", &b_info->u.pv.bootloader_args); } @@ -1202,7 +1205,8 @@ skip_nic: } } - if (!xlu_cfg_get_list(config, "vif2", NULL, 0, 0)) { + if (!xlu_cfg_get_list(config, "vif2", NULL, 0, 0) && dom_info && + !dom_info->ignore_warn) { fprintf(stderr, "WARNING: vif2: netchannel2 is deprecated and not supported by xl\n"); } @@ -1386,7 +1390,8 @@ skip_vfb: } /* parse device model arguments, this works for pv, hvm and stubdom */ - if (!xlu_cfg_get_string (config, "device_model", &buf, 0)) { + if (!xlu_cfg_get_string (config, "device_model", &buf, 0) && dom_info && + !dom_info->ignore_warn) { fprintf(stderr, "WARNING: ignoring device_model directive.\n" "WARNING: Use \"device_model_override\" instead if you" @@ -1418,7 +1423,7 @@ skip_vfb: "Unknown device_model_version \"%s\" specified\n", buf); exit(1); } - } else if (b_info->device_model) + } else if (b_info->device_model && dom_info && !dom_info->ignore_warn) fprintf(stderr, "WARNING: device model override given without specific DM version\n"); xlu_cfg_get_defbool (config, "device_model_stubdomain_override", &b_info->device_model_stubdomain, 0); -- 1.7.7.6 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |