opal_info_support: refactor component output separation
Adding component name to the pvar pretty output as well. Further, I think keeping the asprintf()/opal_info_out(msg,msg,------) within the loops is needed to avoid printing any component information (independently for group_vars and group_pvars) in case the upcoming parameters are internal and not to be displayed. Lastly, unnecessarily duplicating the dashed output should not happen as each invocation of opal_info_show_mca_group_params() passes a new group structure which we check. Signed-off-by: Karol Mroz <mroz.karol@gmail.com>
Этот коммит содержится в:
родитель
43254391a8
Коммит
13979f559f
@ -648,6 +648,8 @@ static void opal_info_show_mca_group_params(const mca_base_var_group_t *group, m
|
|||||||
|
|
||||||
const mca_base_var_group_t *curr_group = NULL;
|
const mca_base_var_group_t *curr_group = NULL;
|
||||||
char *component_msg = NULL;
|
char *component_msg = NULL;
|
||||||
|
asprintf(&component_msg, " %s", group_component);
|
||||||
|
|
||||||
for (i = 0 ; i < count ; ++i) {
|
for (i = 0 ; i < count ; ++i) {
|
||||||
ret = mca_base_var_get(variables[i], &var);
|
ret = mca_base_var_get(variables[i], &var);
|
||||||
if (OPAL_SUCCESS != ret || ((var->mbv_flags & MCA_BASE_VAR_FLAG_INTERNAL) &&
|
if (OPAL_SUCCESS != ret || ((var->mbv_flags & MCA_BASE_VAR_FLAG_INTERNAL) &&
|
||||||
@ -657,8 +659,6 @@ static void opal_info_show_mca_group_params(const mca_base_var_group_t *group, m
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (opal_info_pretty && curr_group != group) {
|
if (opal_info_pretty && curr_group != group) {
|
||||||
free(component_msg);
|
|
||||||
asprintf(&component_msg, " %s", group_component);
|
|
||||||
asprintf(&message, "MCA%s %s%s", requested ? "" : " (disabled)",
|
asprintf(&message, "MCA%s %s%s", requested ? "" : " (disabled)",
|
||||||
group->group_framework,
|
group->group_framework,
|
||||||
component_msg ? component_msg : "");
|
component_msg ? component_msg : "");
|
||||||
@ -704,6 +704,15 @@ static void opal_info_show_mca_group_params(const mca_base_var_group_t *group, m
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opal_info_pretty && curr_group != group) {
|
||||||
|
asprintf(&message, "MCA%s %s%s", requested ? "" : " (disabled)",
|
||||||
|
group->group_framework,
|
||||||
|
component_msg ? component_msg : "");
|
||||||
|
opal_info_out(message, message, "---------------------------------------------------");
|
||||||
|
free(message);
|
||||||
|
curr_group = group;
|
||||||
|
}
|
||||||
|
|
||||||
ret = mca_base_pvar_dump (variables[i], &strings, !opal_info_pretty ? MCA_BASE_VAR_DUMP_PARSABLE : MCA_BASE_VAR_DUMP_READABLE);
|
ret = mca_base_pvar_dump (variables[i], &strings, !opal_info_pretty ? MCA_BASE_VAR_DUMP_PARSABLE : MCA_BASE_VAR_DUMP_READABLE);
|
||||||
if (OPAL_SUCCESS != ret) {
|
if (OPAL_SUCCESS != ret) {
|
||||||
continue;
|
continue;
|
||||||
@ -711,7 +720,9 @@ static void opal_info_show_mca_group_params(const mca_base_var_group_t *group, m
|
|||||||
|
|
||||||
for (j = 0 ; strings[j] ; ++j) {
|
for (j = 0 ; strings[j] ; ++j) {
|
||||||
if (0 == j && opal_info_pretty) {
|
if (0 == j && opal_info_pretty) {
|
||||||
asprintf (&message, "MCA%s %s", requested ? "" : " (disabled)", group->group_framework);
|
asprintf (&message, "MCA%s %s%s", requested ? "" : " (disabled)",
|
||||||
|
group->group_framework,
|
||||||
|
component_msg ? component_msg : "");
|
||||||
opal_info_out(message, message, strings[j]);
|
opal_info_out(message, message, strings[j]);
|
||||||
free(message);
|
free(message);
|
||||||
} else {
|
} else {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user