From 4f9ff14508084789c731e99d8921c052da694319 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 27 Apr 2017 12:13:09 -0500 Subject: 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. --- tools/pvresize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/pvresize.c') diff --git a/tools/pvresize.c b/tools/pvresize.c index 1de170906..8a65952e5 100644 --- a/tools/pvresize.c +++ b/tools/pvresize.c @@ -72,13 +72,13 @@ int pvresize(struct cmd_context *cmd, int argc, char **argv) goto out; } - 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"); ret = EINVALID_CMD_LINE; goto out; } - params.new_size = arg_uint64_value(cmd, physicalvolumesize_ARG, + params.new_size = arg_uint64_value(cmd, setphysicalvolumesize_ARG, UINT64_C(0)); params.done = 0; -- cgit v1.2.1