-
- parent_def_scope = trace->definition_scope;
- if (stream->packet_context_decl) {
- struct definition *definition =
- stream->packet_context_decl->p.definition_new(&stream->packet_context_decl->p,
- parent_def_scope, 0, 0, "stream.packet.context");
- if (!definition) {
- ret = -EINVAL;
- goto error;
- }
- stream->packet_context = container_of(definition,
- struct definition_struct, p);
- parent_def_scope = stream->packet_context->scope;
- }
- if (stream->event_header_decl) {
- struct definition *definition =
- stream->event_header_decl->p.definition_new(&stream->event_header_decl->p,
- parent_def_scope, 0, 0, "stream.event.header");
- if (!definition) {
- ret = -EINVAL;
- goto error;
- }
- stream->event_header =
- container_of(definition, struct definition_struct, p);
- parent_def_scope = stream->event_header->scope;
- }
- if (stream->event_context_decl) {
- struct definition *definition =
- stream->event_context_decl->p.definition_new(&stream->event_context_decl->p,
- parent_def_scope, 0, 0, "stream.event.context");
- if (!definition) {
- ret = -EINVAL;
- goto error;
- }
- stream->event_context =
- container_of(definition, struct definition_struct, p);
- parent_def_scope = stream->event_context->scope;
- }
- stream->definition_scope = parent_def_scope;