mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: move setting of parameter zero
Since we may need to use different default value, move read of zero_ARG prior processing of parameters.
This commit is contained in:
parent
54c73b7723
commit
2c3bbf0a6c
@ -812,6 +812,12 @@ static int _lvcreate_params(struct lvcreate_params *lp,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Should we zero the lv.
|
||||
*/
|
||||
lp->zero = strcmp(arg_str_value(cmd, zero_ARG,
|
||||
(lp->segtype->flags & SEG_CANNOT_BE_ZEROED) ? "n" : "y"), "n");
|
||||
|
||||
if (!_lvcreate_name_params(lp, cmd, &argc, &argv) ||
|
||||
!_read_size_params(lp, lcp, cmd) ||
|
||||
!get_stripe_params(cmd, &lp->stripes, &lp->stripe_size) ||
|
||||
@ -877,12 +883,6 @@ static int _lvcreate_params(struct lvcreate_params *lp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Should we zero the lv.
|
||||
*/
|
||||
lp->zero = strcmp(arg_str_value(cmd, zero_ARG,
|
||||
(lp->segtype->flags & SEG_CANNOT_BE_ZEROED) ? "n" : "y"), "n");
|
||||
|
||||
if (lp->mirrors > DEFAULT_MIRROR_MAX_IMAGES) {
|
||||
log_error("Only up to %d images in mirror supported currently.",
|
||||
DEFAULT_MIRROR_MAX_IMAGES);
|
||||
|
Loading…
Reference in New Issue
Block a user