1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

toolcontext: Improve invalid units error message.

This commit is contained in:
Alasdair G Kergon 2017-07-27 00:51:50 +01:00
parent 54f5bc01b9
commit 3654f478e1

View File

@ -474,10 +474,12 @@ bad:
int process_profilable_config(struct cmd_context *cmd)
{
const char *units;
if (!(cmd->default_settings.unit_factor =
dm_units_to_factor(find_config_tree_str(cmd, global_units_CFG, NULL),
dm_units_to_factor(units = find_config_tree_str(cmd, global_units_CFG, NULL),
&cmd->default_settings.unit_type, 1, NULL))) {
log_error("Invalid units specification");
log_error("Unrecognised configuration setting for global/units: %s", units);
return 0;
}
@ -2009,7 +2011,6 @@ out:
cmd = NULL;
}
return cmd;
}