1
1

var: fix segv in deprecated file var show_help()

Ensure to include the new variable filename in the show_help() output
when we load a deprecated MCA param from a file.

Fixes #236
Этот коммит содержится в:
Jeff Squyres 2014-10-15 08:07:31 -07:00
родитель 51027a6635
Коммит dc66e197cc

Просмотреть файл

@ -1603,10 +1603,11 @@ static int var_set_from_file (mca_base_var_t *var, opal_list_t *file_values)
const char *var_full_name = var->mbv_full_name;
const char *var_long_name = var->mbv_long_name;
bool deprecated = VAR_IS_DEPRECATED(var[0]);
bool is_synonym = VAR_IS_SYNONYM(var[0]);
mca_base_var_file_value_t *fv;
int ret;
if (VAR_IS_SYNONYM(var[0])) {
if (is_synonym) {
ret = var_get (var->mbv_synonym_for, &var, true);
if (OPAL_SUCCESS != ret) {
return OPAL_ERROR;
@ -1653,8 +1654,15 @@ static int var_set_from_file (mca_base_var_t *var, opal_list_t *file_values)
}
if (deprecated) {
const char *new_variable = "None (going away)";
if (is_synonym) {
new_variable = var->mbv_full_name;
}
opal_show_help("help-mca-var.txt", "deprecated-mca-file",
true, var_full_name, fv->mbvfv_file);
true, var_full_name, fv->mbvfv_file,
new_variable);
}
if (NULL != fv->mbvfv_file) {