]> sourceware.org Git - lvm2.git/commitdiff
toollib: Report errors on non-PV arguments to process_each_label.
authorPetr Rockai <prockai@redhat.com>
Tue, 20 Aug 2013 23:32:51 +0000 (01:32 +0200)
committerPetr Rockai <prockai@redhat.com>
Sun, 17 Nov 2013 20:43:06 +0000 (21:43 +0100)
tools/toollib.c

index 529088c1a3d378fb8f3ee03400e38ae028c8994d..9a33e55d8b4e08ef99ec53cf475a02ddef18576d 100644 (file)
@@ -1821,8 +1821,12 @@ int process_each_label(struct cmd_context *cmd, int argc, char **argv, void *han
                                continue;
                        }
 
-                       if (!label_read(dev, &label, 0))
+                       if (!label_read(dev, &label, 0)) {
+                               log_error("No physical volume label read from %s",
+                                         argv[opt]);
+                               ret_max = ECMD_FAILED;
                                continue;
+                       }
 
                        ret = process_single_label(cmd, label, handle);
 
This page took 0.044331 seconds and 5 git commands to generate.