diff options
author | Alasdair G Kergon <agk@redhat.com> | 2016-06-21 22:24:52 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2016-06-21 22:24:52 +0100 |
commit | 7e671e5dd0af699244902d5ce71a7159253c9e2b (patch) | |
tree | ce14c9ff42cc60f8255a735dcae8f3e34ca1775e /tools/vgreduce.c | |
parent | 6c269e639a121329fc035685f944816a763b23cf (diff) | |
download | lvm2-7e671e5dd0af699244902d5ce71a7159253c9e2b.tar.gz |
tools: Use arg_is_set instead of arg_count.
Diffstat (limited to 'tools/vgreduce.c')
-rw-r--r-- | tools/vgreduce.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/vgreduce.c b/tools/vgreduce.c index bae2b3e72..7b9f506f2 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -107,7 +107,7 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg) goto restart; } - if (arg_count(cmd, mirrorsonly_ARG) && !lv_is_mirrored(lv)) { + if (arg_is_set(cmd, mirrorsonly_ARG) && !lv_is_mirrored(lv)) { log_error("Non-mirror-image LV %s found: can't remove.", lv->name); continue; } @@ -177,7 +177,7 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv) struct processing_handle *handle; struct vgreduce_params vp = { 0 }; const char *vg_name; - int repairing = arg_count(cmd, removemissing_ARG); + int repairing = arg_is_set(cmd, removemissing_ARG); int saved_ignore_suspended_devices = ignore_suspended_devices(); int ret; @@ -192,17 +192,17 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv) return EINVALID_CMD_LINE; } - if (arg_count(cmd, mirrorsonly_ARG) && !repairing) { + if (arg_is_set(cmd, mirrorsonly_ARG) && !repairing) { log_error("--mirrorsonly requires --removemissing"); return EINVALID_CMD_LINE; } - if (argc == 1 && !arg_count(cmd, all_ARG) && !repairing) { + if (argc == 1 && !arg_is_set(cmd, all_ARG) && !repairing) { log_error("Please enter physical volume paths or option -a"); return EINVALID_CMD_LINE; } - if (argc > 1 && arg_count(cmd, all_ARG)) { + if (argc > 1 && arg_is_set(cmd, all_ARG)) { log_error("Option -a and physical volume paths mutually " "exclusive"); return EINVALID_CMD_LINE; |