diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-09-04 13:31:17 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2014-10-01 10:49:38 -0500 |
commit | fe870b845dd3193546946485becd4302377736b3 (patch) | |
tree | 761e60325096c8cecd1ae8ff279d12414ee84e2c | |
parent | 47464c09a406141e2956631fef7b4ea7168f554f (diff) | |
download | lvm2-fe870b845dd3193546946485becd4302377736b3.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..fd69a6a0e 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 volume %s.", + display_lvname(lvl->lv)); + continue; + } /* * Only let hidden LVs through it --all was used or the LVs |