summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2008-04-09 12:45:32 +0000
committerAlasdair Kergon <agk@redhat.com>2008-04-09 12:45:32 +0000
commit178e1df257026b25a099930cf33711b85bace271 (patch)
treeb28190284a031209d0763452cb4a07cfeb94d2bc /tools
parentf99a79b64a51112d1ffb3efd37b7f0f7a7e7eb32 (diff)
downloadlvm2-178e1df257026b25a099930cf33711b85bace271.tar.gz
lvm2-178e1df257026b25a099930cf33711b85bace271.tar.xz
lvm2-178e1df257026b25a099930cf33711b85bace271.zip
Fix some pvmove error status codes.
Diffstat (limited to 'tools')
-rw-r--r--tools/polldaemon.h24
-rw-r--r--tools/pvmove.c9
2 files changed, 17 insertions, 16 deletions
diff --git a/tools/polldaemon.h b/tools/polldaemon.h
index 3b5ffa3c..197f02f2 100644
--- a/tools/polldaemon.h
+++ b/tools/polldaemon.h
@@ -19,21 +19,21 @@
#include "metadata-exported.h"
struct poll_functions {
- const char *(*get_copy_name_from_lv) (struct logical_volume * lv_mirr);
- struct volume_group *(*get_copy_vg) (struct cmd_context * cmd,
+ const char *(*get_copy_name_from_lv) (struct logical_volume *lv_mirr);
+ struct volume_group *(*get_copy_vg) (struct cmd_context *cmd,
const char *name);
- struct logical_volume *(*get_copy_lv) (struct cmd_context * cmd,
- struct volume_group * vg,
+ struct logical_volume *(*get_copy_lv) (struct cmd_context *cmd,
+ struct volume_group *vg,
const char *name,
uint32_t lv_type);
- int (*update_metadata) (struct cmd_context * cmd,
- struct volume_group * vg,
- struct logical_volume * lv_mirr,
- struct list * lvs_changed, int first_time);
- int (*finish_copy) (struct cmd_context * cmd,
- struct volume_group * vg,
- struct logical_volume * lv_mirr,
- struct list * lvs_changed);
+ int (*update_metadata) (struct cmd_context *cmd,
+ struct volume_group *vg,
+ struct logical_volume *lv_mirr,
+ struct list *lvs_changed, int first_time);
+ int (*finish_copy) (struct cmd_context *cmd,
+ struct volume_group *vg,
+ struct logical_volume *lv_mirr,
+ struct list *lvs_changed);
};
struct daemon_parms {
diff --git a/tools/pvmove.c b/tools/pvmove.c
index 7a14a8d4..e5ee697f 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -565,8 +565,10 @@ int pvmove(struct cmd_context *cmd, int argc, char **argv)
char *colon;
int ret;
- if (!pvmove_target_present(cmd, 0))
- return 0;
+ if (!pvmove_target_present(cmd, 0)) {
+ stack;
+ return ECMD_FAILED;
+ }
if (argc) {
pv_name = argv[0];
@@ -577,7 +579,7 @@ int pvmove(struct cmd_context *cmd, int argc, char **argv)
(unsigned) (colon -
pv_name)))) {
log_error("Failed to clone PV name");
- return 0;
+ return ECMD_FAILED;
}
}
@@ -587,7 +589,6 @@ int pvmove(struct cmd_context *cmd, int argc, char **argv)
stack;
return ret;
}
-
}
return pvmove_poll(cmd, pv_name,