+static
+void ctf_print_truncated_packet(FILE *fp, struct ctf_stream_definition *stream,
+ uint64_t packet_size, uint64_t remaining_file_size)
+{
+ fprintf(fp, "[error] Packet size (%" PRIu64 " bits) is larger than remaining file size (%" PRIu64 " bits) in trace with UUID \"",
+ packet_size, remaining_file_size);
+ print_uuid(fp, stream->stream_class->trace->uuid);
+ fprintf(fp, "\"");
+
+ if (stream->stream_class->trace->parent.path[0] != '\0') {
+ fprintf(fp, ", at path: \"%s\"",
+ stream->stream_class->trace->parent.path);
+ }
+
+ fprintf(fp, ", within stream id %" PRIu64, stream->stream_id);
+ if (stream->path[0] != '\0') {
+ fprintf(fp, ", at relative path: \"%s\"", stream->path);
+ }
+
+ fprintf(fp, ".\n");
+ fflush(fp);
+}
+