diff options
author | Alasdair G Kergon <agk@redhat.com> | 2017-07-27 00:51:50 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2017-07-27 00:51:50 +0100 |
commit | 3654f478e1beab950f9ee91bc2fd759d22552e1c (patch) | |
tree | 0bd04982fda992d36ee4659168827238bfddc692 | |
parent | 54f5bc01b9509f80b3e8fe16f8bb1bc0228265ab (diff) | |
download | lvm2-3654f478e1beab950f9ee91bc2fd759d22552e1c.tar.gz |
toolcontext: Improve invalid units error message.
-rw-r--r-- | lib/commands/toolcontext.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index 678ee8a0c..39b300a78 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -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; } |