summaryrefslogtreecommitdiffstats
path: root/tools/lvcreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lvcreate.c')
-rw-r--r--tools/lvcreate.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index ea5111bd..def36b97 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -587,6 +587,16 @@ static int _read_activation_params(struct lvcreate_params *lp, struct cmd_contex
if (!(lp->permission & LVM_WRITE))
lp->zero = 0;
+ if (arg_count(cmd, major_ARG) > 1) {
+ log_error("Option -j/--major may not be repeated.");
+ return 0;
+ }
+
+ if (arg_count(cmd, minor_ARG) > 1) {
+ log_error("Option --minor may not be repeated.");
+ return 0;
+ }
+
lp->minor = arg_int_value(cmd, minor_ARG, -1);
lp->major = arg_int_value(cmd, major_ARG, -1);