#include <inttypes.h>
#include <ctype.h>
-#include <src/common/sessiond-comm/sessiond-comm.h>
+#include <common/sessiond-comm/sessiond-comm.h>
#include <common/compat/string.h>
#include <common/string-utils/string-utils.h>
return ret;
}
-static
-int check_exclusions_subsets(const char *event_name,
- char * const *exclusions)
-{
- int ret = 0;
- char * const *item;
-
- for (item = exclusions; *item; item++) {
- ret = check_exclusion_subsets(event_name, *item);
- if (ret) {
- goto end;
- }
- }
-
-end:
- return ret;
-}
-
static
int create_exclusion_list_and_validate(const char *event_name,
const char *exclusions_arg,
for (exclusion = exclusions; *exclusion; exclusion++) {
if (!strutils_is_star_glob_pattern(*exclusion) ||
strutils_is_star_at_the_end_only_glob_pattern(*exclusion)) {
- ret = check_exclusions_subsets(
- event_name, exclusion);
+ ret = check_exclusion_subsets(event_name, *exclusion);
if (ret) {
goto error;
}
int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1;
static poptContext pc;
char *session_name = NULL;
+ const char *leftover = NULL;
int event_type = -1;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
goto end;
}
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
if (!opt_session_name) {
session_name = get_session_name();
if (session_name == NULL) {