Skip to contentSkip to conversation

dev-dct-process-part3 - toollib: Report errors on non-PV arguments to process_each_label.

PATCH Petr Rockai 1 participant 1 message Aug 20, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a1dce692177b946ffa9ea85250567ad7abde729a
Commit:        a1dce692177b946ffa9ea85250567ad7abde729a
Parent:        785d5122132450ca206eb187df69125b978af43c
Author:        Petr Rockai <[email protected]>
AuthorDate:    Wed Aug 21 01:32:51 2013 +0200
Committer:     Petr Rockai <[email protected]>
CommitterDate: Wed Aug 21 01:35:21 2013 +0200

toollib: Report errors on non-PV arguments to process_each_label.

---
 tools/toollib.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
tools/toollib.c +5 -1
index 0af018a..ab0cd0d 100644
@@ -1142,8 +1142,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);