Skip to content
Snippets Groups Projects
Commit a7b743e1 authored by Matthieu Schaller's avatar Matthieu Schaller Committed by Peter W. Draper
Browse files

Be verbose when the YAML parameters are overwritten by a -P command-line argument.

parent e5196580
Branches
Tags
1 merge request!402Yamling
......@@ -396,8 +396,12 @@ int main(int argc, char *argv[]) {
parser_read_file(paramFileName, params);
/* Handle any command-line overrides. */
if (nparams > 0)
if (nparams > 0) {
message(
"Overwriting values read from the YAML file with command-line "
"values.");
for (int k = 0; k < nparams; k++) parser_set_param(params, cmdparams[k]);
}
/* And dump the parameters as used. */
// parser_print_params(&params);
......
......@@ -133,6 +133,8 @@ void parser_set_param(struct swift_params *params, const char *namevalue) {
int updated = 0;
for (int i = 0; i < params->paramCount; i++) {
if (strcmp(name, params->data[i].name) == 0) {
message("Using the value '%s' instead of '%s' for the parameter '%s'",
value, params->data[i].value, params->data[i].name);
strcpy(params->data[i].value, value);
updated = 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment