From ed8c4d996183137048def5df51ac5106b791f3cc Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Wed, 24 Sep 2008 16:32:51 +0000 Subject: [PATCH] Fix validation of --minor and --major in lvcreate to require -My always. --- WHATS_NEW | 1 + tools/lvcreate.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 18ecdab61..0a864e7a2 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.41 - ===================================== + Fix validation of --minor and --major in lvcreate to require -My always. Fix release: clvmd build, vgreduce consolidate & tests, /dev/ioerror warning. Version 2.02.40 - 19th September 2008 diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 00fc344d0..dfd9b8752 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -500,6 +500,9 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd, return 0; } } + } else if (arg_count(cmd, minor_ARG) || arg_count(cmd, major_ARG)) { + log_error("--major and --minor require -My"); + return 0; } lp->pv_count = argc; -- 2.43.5