summaryrefslogtreecommitdiff
path: root/tools/pvremove.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2013-07-06 03:28:21 +0100
committerAlasdair G Kergon <agk@redhat.com>2013-07-06 03:28:21 +0100
commit7c6526aae277c049aa4a6e41b7c2b30d366c9852 (patch)
treeed387b4dc960f6f41be509336d6cdd64eaca25e4 /tools/pvremove.c
parenta64239f225463d418dd4ccb931ceda88535fc6e2 (diff)
downloadlvm2-7c6526aae277c049aa4a6e41b7c2b30d366c9852.tar.gz
lvresize: separate validation from action
Start separating the validation from the action in the basic lvresize code moved to the library. Remove incorrect use of command line error codes from lvresize library functions. Move errors.h to tools directory to reinforce this, exporting public versions of the error codes in lvm2cmd.h for dmeventd plugins to use.
Diffstat (limited to 'tools/pvremove.c')
-rw-r--r--tools/pvremove.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/pvremove.c b/tools/pvremove.c
index a99a9bdfc..45c675ea3 100644
--- a/tools/pvremove.c
+++ b/tools/pvremove.c
@@ -16,7 +16,6 @@
#include "tools.h"
#include "metadata.h"
-
int pvremove(struct cmd_context *cmd, int argc, char **argv)
{
int i, r;
@@ -34,9 +33,8 @@ int pvremove(struct cmd_context *cmd, int argc, char **argv)
for (i = 0; i < argc; i++) {
dm_unescape_colons_and_at_signs(argv[i], NULL, NULL);
- r = pvremove_single(cmd, argv[i], NULL, force_count, prompt);
- if (r > ret)
- ret = r;
+ if (!pvremove_single(cmd, argv[i], NULL, force_count, prompt))
+ ret = ECMD_FAILED;
}
return ret;