@@ -269,7 +269,6 @@ struct tracecmd_event_list {
struct tracecmd_option;
struct tracecmd_msg_handle;
-struct tracecmd_output *tracecmd_output_allocate(int fd);
int tracecmd_output_set_msg(struct tracecmd_output *handle,
struct tracecmd_msg_handle *msg_handle);
int tracecmd_output_set_trace_dir(struct tracecmd_output *handle, const char *tracing_dir);
@@ -280,6 +279,7 @@ int tracecmd_output_write_headers(struct tracecmd_output *handle,
struct tracecmd_event_list *list);
struct tracecmd_output *tracecmd_output_create(const char *output_file);
+struct tracecmd_output *tracecmd_output_create_fd(int fd);
struct tracecmd_output *tracecmd_create_file_latency(const char *output_file, int cpus);
struct tracecmd_output *tracecmd_create_init_fd(int fd);
@@ -898,7 +898,7 @@ out_free:
}
/**
- * tracecmd_output_allocate - allocate new output handle to a trace file
+ * tracecmd_output_create_fd - allocate new output handle to a trace file
* @fd: File descriptor for the handle to write to.
*
* Allocate a tracecmd_output descriptor and perform minimal initialization.
@@ -909,7 +909,7 @@ out_free:
* a tracecmd data file. In case of an error, NULL is returned. The returned
* handle must be freed with tracecmd_output_close() or tracecmd_output_free()
*/
-struct tracecmd_output *tracecmd_output_allocate(int fd)
+struct tracecmd_output *tracecmd_output_create_fd(int fd)
{
struct tracecmd_output *handle;
@@ -1819,7 +1819,7 @@ struct tracecmd_output *tracecmd_output_create(const char *output_file)
if (fd < 0)
return NULL;
}
- out = tracecmd_output_allocate(fd);
+ out = tracecmd_output_create_fd(fd);
if (!out && fd >= 0) {
close(fd);
unlink(output_file);
@@ -1832,7 +1832,7 @@ struct tracecmd_output *tracecmd_create_init_fd(int fd)
{
struct tracecmd_output *out;
- out = tracecmd_output_allocate(fd);
+ out = tracecmd_output_create_fd(fd);
if (!out)
return NULL;
if (tracecmd_output_write_init(out))
@@ -3737,7 +3737,7 @@ setup_connection(struct buffer_instance *instance, struct common_record_context
if (ret)
goto error;
} else {
- network_handle = tracecmd_output_allocate(msg_handle->fd);
+ network_handle = tracecmd_output_create_fd(msg_handle->fd);
if (!network_handle)
goto error;
if (tracecmd_output_write_headers(network_handle, listed_events))
The existing tracecmd_output_allocate() API is renamed to tracecmd_output_create_fd(), to be consistent with tracecmd_output_create() API. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- lib/trace-cmd/include/private/trace-cmd-private.h | 2 +- lib/trace-cmd/trace-output.c | 8 ++++---- tracecmd/trace-record.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)