require polling for scanconfig
This commit is contained in:
@@ -247,6 +247,10 @@ error_t parse_opt(int key, char *arg, struct argp_state *state)
|
|||||||
argp_error(state, "cannot combine readonly with scanconfig/answer/generatesyn");
|
argp_error(state, "cannot combine readonly with scanconfig/answer/generatesyn");
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
if (opt->pollInterval == 0) {
|
||||||
|
argp_error(state, "scanconfig without polling may lead to invalid files included for certain products!");
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
if (arg != NULL) {
|
if (arg != NULL) {
|
||||||
if (arg[0] == 0 || strcmp("none", arg) == 0) {
|
if (arg[0] == 0 || strcmp("none", arg) == 0) {
|
||||||
opt->initialScan = ESC;
|
opt->initialScan = ESC;
|
||||||
@@ -277,6 +281,10 @@ error_t parse_opt(int key, char *arg, struct argp_state *state)
|
|||||||
argp_error(state, "invalid pollinterval");
|
argp_error(state, "invalid pollinterval");
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
if (opt->pollInterval == 0 && opt->scanConfig) {
|
||||||
|
argp_error(state, "scanconfig without polling may lead to invalid files included for certain products!");
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// eBUS options:
|
// eBUS options:
|
||||||
|
|||||||
Reference in New Issue
Block a user