From: Milan Broz Date: Thu, 19 Aug 2010 23:04:37 +0000 (+0000) Subject: Remove assumption that --yes must be used only in --force mode X-Git-Tag: v2_02_91~1583 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=cca6ab596f0625bb8c0386a3688f6b0480a34c95;p=lvm2.git Remove assumption that --yes must be used only in --force mode This is not only undocumented but is is also in violation with --help documentation. Using --yes without --force is useful in pvcreate when it detects old signature. --- diff --git a/WHATS_NEW b/WHATS_NEW index 1a16f7b17..22dc07194 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,6 +1,7 @@ Version 2.02.74 - ================================== Simplify MD/swap signature detection in pvcreate and allow aborting. + Remove assumption that --yes must be used only in --force mode. Version 2.02.73 - 18th August 2010 ================================== diff --git a/tools/pvremove.c b/tools/pvremove.c index 8242993cb..c57df64c6 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -143,11 +143,6 @@ int pvremove(struct cmd_context *cmd, int argc, char **argv) return EINVALID_CMD_LINE; } - if (arg_count(cmd, yes_ARG) && !arg_count(cmd, force_ARG)) { - log_error("Option y can only be given with option f"); - return EINVALID_CMD_LINE; - } - for (i = 0; i < argc; i++) { r = pvremove_single(cmd, argv[i], NULL); if (r > ret) diff --git a/tools/toollib.c b/tools/toollib.c index bdb52d571..5da30f46b 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -1344,11 +1344,6 @@ int pvcreate_params_validate(struct cmd_context *cmd, return 0; } - if (arg_count(cmd, yes_ARG) && !arg_count(cmd, force_ARG)) { - log_error("Option y can only be given with option f"); - return 0; - } - pp->yes = arg_count(cmd, yes_ARG); pp->force = arg_count(cmd, force_ARG);