mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
polldaemon: ret invalid cmd for negative interval
Negative intervals are not supported.
This commit is contained in:
parent
a8d63994ea
commit
45f45c9932
@ -1,5 +1,6 @@
|
||||
Version 2.02.107 -
|
||||
==================================
|
||||
Return invalid command when specifying negative polling interval.
|
||||
|
||||
Version 2.02.106 - 10th April 2014
|
||||
==================================
|
||||
|
@ -247,8 +247,10 @@ int poll_daemon(struct cmd_context *cmd, const char *name, const char *uuid,
|
||||
parms.aborting = arg_is_set(cmd, abort_ARG);
|
||||
parms.background = background;
|
||||
interval_sign = arg_sign_value(cmd, interval_ARG, SIGN_NONE);
|
||||
if (interval_sign == SIGN_MINUS)
|
||||
if (interval_sign == SIGN_MINUS) {
|
||||
log_error("Argument to --interval cannot be negative");
|
||||
return EINVALID_CMD_LINE;
|
||||
}
|
||||
parms.interval = arg_uint_value(cmd, interval_ARG,
|
||||
find_config_tree_int(cmd, activation_polling_interval_CFG, NULL));
|
||||
parms.wait_before_testing = (interval_sign == SIGN_PLUS);
|
||||
|
Loading…
Reference in New Issue
Block a user