diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-09-04 13:31:17 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2014-09-22 10:32:24 -0500 |
commit | 6be399b5ebb0f9a0e0d345747d1c164cc3911e2e (patch) | |
tree | 7f4ed43f6dc6ae27e375264aba90f955747b94cd | |
parent | 57d65e0681aeba46f221cea7e5686d531f4f53ae (diff) | |
download | lvm2-6be399b5ebb0f9a0e0d345747d1c164cc3911e2e.tar.gz |
toollib: print ignoring vorigin
When ignoring 'listed' volume, print info message.
(So the final command error message is a bit less confusing,
i.e. when user tries to deactive virtual origin:
> lvchange -an vg/lvol2_vorigin
Ignoring virtual origin logical volume vg/lvol2_vorigin.
One or more specified logical volume(s) not found.
(Reapplied after revert.)
-rw-r--r-- | tools/toollib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/toollib.c b/tools/toollib.c index 903ea197c..0c671ac39 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -1505,8 +1505,14 @@ int process_each_lv_in_vg(struct cmd_context *cmd, lv_is_cow(lvl->lv) && !lv_is_virtual_origin(origin_from_cow(lvl->lv))) continue; - if (lv_is_virtual_origin(lvl->lv) && !arg_count(cmd, all_ARG)) + if (lv_is_virtual_origin(lvl->lv) && !arg_count(cmd, all_ARG)) { + if (lvargs_supplied && + str_list_match_item(arg_lvnames, lvl->lv->name)) + log_print_unless_silent("Ignoring virtual origin logical + display_lvname(lvl->lv)); + continue; + } /* * Only let hidden LVs through it --all was used or the LVs |