diff options
author | Petr Rockai <prockai@redhat.com> | 2013-08-21 01:32:51 +0200 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2013-11-17 21:43:06 +0100 |
commit | d5095222fa4f8cea89b721dcb12adad89176413e (patch) | |
tree | 41f4f2ba12dff54166af0a6ffcf000ae94641588 | |
parent | 67c563ac2b643f97602686dc07cee4a8bdb5bc34 (diff) | |
download | lvm2-d5095222fa4f8cea89b721dcb12adad89176413e.tar.gz |
toollib: Report errors on non-PV arguments to process_each_label.
-rw-r--r-- | tools/toollib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/toollib.c b/tools/toollib.c index 529088c1a..9a33e55d8 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -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); |