aboutsummaryrefslogtreecommitdiff
path: root/trace/simple.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-01-07 16:55:24 +0300
committerStefan Hajnoczi <stefanha@redhat.com>2016-02-03 09:19:09 +0000
commit41fc57e44ed64cd4ab5393d83624afd897dabd4f (patch)
tree8402d21c2011befea319ad11ba22e14a4bacdb38 /trace/simple.c
parent45bd0b41bdbf554e49fb510673309164c513a8c8 (diff)
trace: split trace_init_file out of trace_init_backends
This is cleaner, and improves error reporting with -daemonize. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-id: 1452174932-28657-4-git-send-email-den@openvz.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/simple.c')
-rw-r--r--trace/simple.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/trace/simple.c b/trace/simple.c
index 56a624cac8..e8594cd00d 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -322,7 +322,7 @@ void st_set_trace_file_enabled(bool enable)
* @file The trace file name or NULL for the default name-<pid> set at
* config time
*/
-bool st_set_trace_file(const char *file)
+void st_set_trace_file(const char *file)
{
st_set_trace_file_enabled(false);
@@ -336,7 +336,6 @@ bool st_set_trace_file(const char *file)
}
st_set_trace_file_enabled(true);
- return true;
}
void st_print_trace_file_status(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...))
@@ -374,7 +373,7 @@ static GThread *trace_thread_create(GThreadFunc fn)
return thread;
}
-bool st_init(const char *file)
+bool st_init(void)
{
GThread *thread;
@@ -387,6 +386,5 @@ bool st_init(const char *file)
}
atexit(st_flush_trace_buffer);
- st_set_trace_file(file);
return true;
}