summaryrefslogtreecommitdiffstats
path: root/tools/lvcreate.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2012-03-06 02:30:49 +0000
committerAlasdair Kergon <agk@redhat.com>2012-03-06 02:30:49 +0000
commitb343d75a5ab76eabd99d056453f18e139ff997e9 (patch)
treed7e38b055f720df8390144b7d77d866f2137a181 /tools/lvcreate.c
parentaeaec150c0e521bd724dbcc4896d6da93babfd2a (diff)
downloadlvm2-b343d75a5ab76eabd99d056453f18e139ff997e9.tar.gz
lvm2-b343d75a5ab76eabd99d056453f18e139ff997e9.tar.xz
lvm2-b343d75a5ab76eabd99d056453f18e139ff997e9.zip
Switch pvscan --cache major:minor to --major --minor.
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);