projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: remove unused m4/libxml.m4
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
lttng-ctl.c
diff --git
a/src/lib/lttng-ctl/lttng-ctl.c
b/src/lib/lttng-ctl/lttng-ctl.c
index 0f9378c2c5d82507df87d2b83a46a5d5f192d733..a8c6c9b24adc33a3b13a14b2f206ffea5edc8230 100644
(file)
--- a/
src/lib/lttng-ctl/lttng-ctl.c
+++ b/
src/lib/lttng-ctl/lttng-ctl.c
@@
-797,7
+797,7
@@
static char *set_agent_filter(const char *filter, struct lttng_event *ev)
assert(ev);
/* Don't add filter for the '*' event. */
assert(ev);
/* Don't add filter for the '*' event. */
- if (
ev->name[0] != '*'
) {
+ if (
strcmp(ev->name, "*") != 0
) {
if (filter) {
err = asprintf(&agent_filter, "(%s) && (logger_name == \"%s\")", filter,
ev->name);
if (filter) {
err = asprintf(&agent_filter, "(%s) && (logger_name == \"%s\")", filter,
ev->name);
@@
-920,12
+920,28
@@
static int generate_filter(char *filter_expression,
ret = -LTTNG_ERR_FILTER_INVAL;
goto parse_error;
}
ret = -LTTNG_ERR_FILTER_INVAL;
goto parse_error;
}
+
+ /* Normalize globbing patterns in the expression. */
+ ret = filter_visitor_ir_normalize_glob_patterns(ctx);
+ if (ret) {
+ ret = -LTTNG_ERR_FILTER_INVAL;
+ goto parse_error;
+ }
+
/* Validate strings used as literals in the expression. */
ret = filter_visitor_ir_validate_string(ctx);
if (ret) {
ret = -LTTNG_ERR_FILTER_INVAL;
goto parse_error;
}
/* Validate strings used as literals in the expression. */
ret = filter_visitor_ir_validate_string(ctx);
if (ret) {
ret = -LTTNG_ERR_FILTER_INVAL;
goto parse_error;
}
+
+ /* Validate globbing patterns in the expression. */
+ ret = filter_visitor_ir_validate_globbing(ctx);
+ if (ret) {
+ ret = -LTTNG_ERR_FILTER_INVAL;
+ goto parse_error;
+ }
+
dbg_printf("done\n");
dbg_printf("Generating bytecode... ");
dbg_printf("done\n");
dbg_printf("Generating bytecode... ");
@@
-2031,14
+2047,14
@@
int lttng_calibrate(struct lttng_handle *handle,
void lttng_channel_set_default_attr(struct lttng_domain *domain,
struct lttng_channel_attr *attr)
{
void lttng_channel_set_default_attr(struct lttng_domain *domain,
struct lttng_channel_attr *attr)
{
- struct lttng_channel_extended *extended =
- (struct lttng_channel_extended *) attr->extended.ptr;
+ struct lttng_channel_extended *extended;
/* Safety check */
if (attr == NULL || domain == NULL) {
return;
}
/* Safety check */
if (attr == NULL || domain == NULL) {
return;
}
+ extended = (struct lttng_channel_extended *) attr->extended.ptr;
memset(attr, 0, sizeof(struct lttng_channel_attr));
/* Same for all domains. */
memset(attr, 0, sizeof(struct lttng_channel_attr));
/* Same for all domains. */
@@
-2591,7
+2607,7
@@
int lttng_register_trigger(struct lttng_trigger *trigger)
}
if (!lttng_trigger_validate(trigger)) {
}
if (!lttng_trigger_validate(trigger)) {
- ret = -LTTNG_ERR_INVALID;
+ ret = -LTTNG_ERR_INVALID
_TRIGGER
;
goto end;
}
goto end;
}
This page took
0.023622 seconds
and
4
git commands to generate.