mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
cleanup: use arg_is_set
This commit is contained in:
parent
ca9482b276
commit
d574072dd8
@ -978,13 +978,12 @@ int get_pool_params(struct cmd_context *cmd,
|
|||||||
*passed_args = 0;
|
*passed_args = 0;
|
||||||
|
|
||||||
if (segtype_is_thin_pool(segtype) || segtype_is_thin(segtype)) {
|
if (segtype_is_thin_pool(segtype) || segtype_is_thin(segtype)) {
|
||||||
if (arg_count(cmd, zero_ARG)) {
|
if (arg_is_set(cmd, zero_ARG)) {
|
||||||
*passed_args |= PASS_ARG_ZERO;
|
*passed_args |= PASS_ARG_ZERO;
|
||||||
*zero = arg_int_value(cmd, zero_ARG, 1);
|
*zero = arg_int_value(cmd, zero_ARG, 1);
|
||||||
log_very_verbose("Setting pool zeroing: %u", *zero);
|
log_very_verbose("Setting pool zeroing: %u", *zero);
|
||||||
}
|
}
|
||||||
|
if (arg_is_set(cmd, discards_ARG)) {
|
||||||
if (arg_count(cmd, discards_ARG)) {
|
|
||||||
*passed_args |= PASS_ARG_DISCARDS;
|
*passed_args |= PASS_ARG_DISCARDS;
|
||||||
*discards = (thin_discards_t) arg_uint_value(cmd, discards_ARG, 0);
|
*discards = (thin_discards_t) arg_uint_value(cmd, discards_ARG, 0);
|
||||||
log_very_verbose("Setting pool discards: %s",
|
log_very_verbose("Setting pool discards: %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user