int opt, ret = CMD_SUCCESS;
static poptContext pc;
char *session_name = NULL;
+ int event_type = -1;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
ret = CMD_UNDEFINED;
goto end;
}
+
+ /* Validate event type. Multiple event type are not supported. */
+ if (event_type == -1) {
+ event_type = opt_event_type;
+ } else {
+ if (event_type != opt_event_type) {
+ ERR("Multiple event type not supported.");
+ ret = CMD_ERROR;
+ goto end;
+ }
+ }
}
opt_event_list = (char*) poptGetArg(pc);