@@ -51,4 +51,7 @@ void out_compression_reset(struct tracecmd_output *handle);
void in_uncompress_reset(struct tracecmd_input *handle);
int in_uncompress_block(struct tracecmd_input *handle);
+void set_out_file_state(struct tracecmd_output *handle, int new_state);
+
+
#endif /* _TRACE_CMD_LOCAL_H */
@@ -1951,6 +1951,11 @@ out_free:
return NULL;
}
+__hidden void set_out_file_state(struct tracecmd_output *handle, int new_state)
+{
+ handle->file_state = new_state;
+}
+
__hidden bool check_out_state(struct tracecmd_output *handle, int new_state)
{
return check_file_state(handle->file_version, handle->file_state, new_state);
Added a new library internal API to set the state of an output file handler: set_out_file_state() This new API will be used internaly in library for split and convert functionality. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- lib/trace-cmd/include/trace-cmd-local.h | 3 +++ lib/trace-cmd/trace-output.c | 5 +++++ 2 files changed, 8 insertions(+)