diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2015-02-11 09:36:09 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2015-02-11 09:36:09 +0100 |
commit | bc1bb7f8c5cd38bdebe18ebbee270882a4ee82d3 (patch) | |
tree | 54c4d7909dd103e868966a856440039496cf9571 | |
parent | 3505e88b18edfc60bb06ffccab8dd91f69356c2d (diff) | |
download | lvm2-bc1bb7f8c5cd38bdebe18ebbee270882a4ee82d3.tar.gz |
toollib: select: issue an error message for failed VG/LV/PV selection
-rw-r--r-- | tools/toollib.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/toollib.c b/tools/toollib.c index a45267623..bdf6494a9 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -1639,8 +1639,10 @@ int select_match_vg(struct cmd_context *cmd, struct processing_handle *handle, sh->orig_report_type = VGS; - if (!report_for_selection(sh, NULL, vg, NULL)) - return_0; + if (!report_for_selection(sh, NULL, vg, NULL)) { + log_error("Selection failed for VG %s.", vg->name); + return 0; + } sh->orig_report_type = 0; *selected = sh->selected; @@ -1660,8 +1662,10 @@ int select_match_lv(struct cmd_context *cmd, struct processing_handle *handle, sh->orig_report_type = LVS; - if (!report_for_selection(sh, NULL, vg, lv)) - return_0; + if (!report_for_selection(sh, NULL, vg, lv)) { + log_error("Selection failed for LV %s.", lv->name); + return 0; + } sh->orig_report_type = 0; *selected = sh->selected; @@ -1681,8 +1685,10 @@ int select_match_pv(struct cmd_context *cmd, struct processing_handle *handle, sh->orig_report_type = PVS; - if (!report_for_selection(sh, pv, vg, NULL)) - return_0; + if (!report_for_selection(sh, pv, vg, NULL)) { + log_error("Selection failed for PV %s.", dev_name(pv->dev)); + return 0; + } sh->orig_report_type = 0; *selected = sh->selected; |