X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Ferror-query.c;h=01ed1ef216e9f3db5c1cccd318099f4f2b188ac6;hb=c989e0d419a78309fa488fbbd74761d81f9e1a42;hp=031257b27ec6e7d4bed66648dfbbe0ca8b47708a;hpb=9de6375f04f962e9eae34ad90f4c66e8bf15c2a8;p=lttng-tools.git diff --git a/src/common/error-query.c b/src/common/error-query.c index 031257b27..01ed1ef21 100644 --- a/src/common/error-query.c +++ b/src/common/error-query.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -47,9 +47,9 @@ struct lttng_error_query_action { struct lttng_trigger *trigger; /* * Index of the target action. Since action lists can't be nested, - * the targetted action is the top-level group if the action_index is + * the targetted action is the top-level list if the action_index is * unset. Otherwise, the index refers to the index within the top-level - * group. + * list. */ LTTNG_OPTIONAL(unsigned int) action_index; }; @@ -127,7 +127,7 @@ extern struct lttng_error_query *lttng_error_query_action_create( const struct lttng_action *action) { struct lttng_error_query_action *query = NULL; - typeof(query->action_index) action_index; + typeof(query->action_index) action_index = {}; struct lttng_trigger *trigger_copy = NULL; if (!trigger || !action) { @@ -145,24 +145,24 @@ extern struct lttng_error_query *lttng_error_query_action_create( * action list. * * Note that action comparisons are performed by pointer since multiple - * otherwise identical actions can be found in an action group (two + * otherwise identical actions can be found in an action list (two * notify actions, for example). */ if (action != trigger->action && lttng_action_get_type(trigger->action) == - LTTNG_ACTION_TYPE_GROUP) { - unsigned int i, action_group_count; + LTTNG_ACTION_TYPE_LIST) { + unsigned int i, action_list_count; enum lttng_action_status action_status; - action_status = lttng_action_group_get_count( - trigger->action, &action_group_count); + action_status = lttng_action_list_get_count( + trigger->action, &action_list_count); if (action_status != LTTNG_ACTION_STATUS_OK) { goto error; } - for (i = 0; i < action_group_count; i++) { + for (i = 0; i < action_list_count; i++) { const struct lttng_action *candidate_action = - lttng_action_group_get_at_index( + lttng_action_list_get_at_index( trigger->action, i); assert(candidate_action); @@ -178,7 +178,7 @@ extern struct lttng_error_query *lttng_error_query_action_create( } } else { /* - * Trigger action is not a group and not equal to the target + * Trigger action is not a list and not equal to the target * action; invalid action provided. */ goto error; @@ -681,12 +681,12 @@ struct lttng_action *lttng_error_query_action_borrow_action_target( target_action = trigger_action; } else { if (lttng_action_get_type(trigger_action) != - LTTNG_ACTION_TYPE_GROUP) { - ERR("Invalid action error query target index: trigger action is not a group"); + LTTNG_ACTION_TYPE_LIST) { + ERR("Invalid action error query target index: trigger action is not a list"); goto end; } - target_action = lttng_action_group_borrow_mutable_at_index( + target_action = lttng_action_list_borrow_mutable_at_index( trigger_action, LTTNG_OPTIONAL_GET(query_action->action_index)); } @@ -827,12 +827,12 @@ ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view, target_action = trigger->action; } else { if (lttng_action_get_type(trigger->action) != - LTTNG_ACTION_TYPE_GROUP) { + LTTNG_ACTION_TYPE_LIST) { used_size = -1; goto end; } - target_action = lttng_action_group_get_at_index( + target_action = lttng_action_list_get_at_index( trigger->action, action_header->action_index.value); }