]> sourceware.org Git - lvm2.git/commitdiff
toollib: select: issue an error message for failed VG/LV/PV selection
authorPeter Rajnoha <prajnoha@redhat.com>
Wed, 11 Feb 2015 08:36:09 +0000 (09:36 +0100)
committerPeter Rajnoha <prajnoha@redhat.com>
Wed, 11 Feb 2015 08:36:09 +0000 (09:36 +0100)
tools/toollib.c

index a452676230292e38f67d78b0175f24a1aaaa582f..bdf6494a949293fb28554b8317583355c016a571 100644 (file)
@@ -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;
This page took 0.047694 seconds and 5 git commands to generate.