summaryrefslogtreecommitdiff
path: root/tools/pvcreate.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2017-04-27 12:13:09 -0500
committerDavid Teigland <teigland@redhat.com>2017-04-27 13:25:41 -0500
commit4f9ff14508084789c731e99d8921c052da694319 (patch)
tree49c7961c0adba15b574754f2b85a7e622f5ea8c8 /tools/pvcreate.c
parent5cf51fb2f74ad43a2555bc391cf069caa1d99775 (diff)
downloadlvm2-4f9ff14508084789c731e99d8921c052da694319.tar.gz
pvcreate: add prompt when setting dev size
If the device size does not match the size requested by --setphysicalvolumesize, then prompt the user. Make the pvcreate checking/prompting code handle multiple prompts for the same device, since the new prompt can be in addition to the existing prompt when the PV is in a VG.
Diffstat (limited to 'tools/pvcreate.c')
-rw-r--r--tools/pvcreate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pvcreate.c b/tools/pvcreate.c
index e69eed4e7..0fe5ad576 100644
--- a/tools/pvcreate.c
+++ b/tools/pvcreate.c
@@ -52,11 +52,11 @@ static int pvcreate_restore_params_from_args(struct cmd_context *cmd, int argc,
pp->pva.idp = &pp->pva.id;
}
- if (arg_sign_value(cmd, physicalvolumesize_ARG, SIGN_NONE) == SIGN_MINUS) {
+ if (arg_sign_value(cmd, setphysicalvolumesize_ARG, SIGN_NONE) == SIGN_MINUS) {
log_error("Physical volume size may not be negative");
return 0;
}
- pp->pva.size = arg_uint64_value(cmd, physicalvolumesize_ARG, UINT64_C(0));
+ pp->pva.size = arg_uint64_value(cmd, setphysicalvolumesize_ARG, UINT64_C(0));
if (arg_is_set(cmd, restorefile_ARG) || arg_is_set(cmd, uuidstr_ARG))
pp->zero = 0;