summaryrefslogtreecommitdiffstats
path: root/tools/lvchange.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2010-10-26 01:37:59 +0000
committerMike Snitzer <snitzer@redhat.com>2010-10-26 01:37:59 +0000
commit178ff2becc6f22db3c68aaa89b7839d47c095705 (patch)
treeddf1d5026f0105da3c0a9daa2e7e38db9dea2ca0 /tools/lvchange.c
parent8328e5f0944f9c685b3d469c08abe28fd32e47a5 (diff)
downloadlvm2-178ff2becc6f22db3c68aaa89b7839d47c095705.tar.gz
lvm2-178ff2becc6f22db3c68aaa89b7839d47c095705.tar.xz
lvm2-178ff2becc6f22db3c68aaa89b7839d47c095705.zip
Fix vgchange to process -a, --refresh, --monitor and --poll like lvchange.
Simultaneous -a and --refresh is not valid. poll+monitor are valid together with or without -ay* (but not with -an*) No longer print polling results summary if no LVs in the VG were polled.
Diffstat (limited to 'tools/lvchange.c')
-rw-r--r--tools/lvchange.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 5ac223ab..cd7a06f0 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -715,7 +715,7 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
int lvchange(struct cmd_context *cmd, int argc, char **argv)
{
- int update = /* options other than -a, --refresh or --monitor */
+ int update = /* options other than -a, --refresh, --monitor or --poll */
arg_count(cmd, contiguous_ARG) || arg_count(cmd, permission_ARG) ||
arg_count(cmd, readahead_ARG) || arg_count(cmd, persistent_ARG) ||
arg_count(cmd, addtag_ARG) || arg_count(cmd, deltag_ARG) ||
@@ -732,6 +732,10 @@ int lvchange(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
+ if (arg_count(cmd, available_ARG) && arg_count(cmd, refresh_ARG)) {
+ log_error("Only one of -a and --refresh permitted.");
+ return EINVALID_CMD_LINE;
+ }
if ((arg_count(cmd, ignorelockingfailure_ARG) ||
arg_count(cmd, sysinit_ARG)) && update) {