From: Marc-André Lureau <marcandre.lur...@redhat.com> Replace error_report() and use tracing instead.
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- net/vhost-user.c | 5 +++-- trace-events | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index dc0aa4c..5657992 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -14,6 +14,7 @@ #include "sysemu/char.h" #include "qemu/config-file.h" #include "qemu/error-report.h" +#include "trace.h" typedef struct VhostUserState { NetClientState nc; @@ -123,16 +124,16 @@ static void net_vhost_user_event(void *opaque, int event) { VhostUserState *s = opaque; + trace_vhost_user_event(s->chr->label, event); + switch (event) { case CHR_EVENT_OPENED: vhost_user_start(s); net_vhost_link_down(s, false); - error_report("chardev \"%s\" went up", s->chr->label); break; case CHR_EVENT_CLOSED: net_vhost_link_down(s, true); vhost_user_stop(s); - error_report("chardev \"%s\" went down", s->chr->label); break; } } diff --git a/trace-events b/trace-events index 94bf3bb..a07b715 100644 --- a/trace-events +++ b/trace-events @@ -1654,3 +1654,6 @@ alsa_no_frames(int state) "No frames available and ALSA state is %d" # audio/ossaudio.c oss_version(int version) "OSS version = %#x" oss_invalid_available_size(int size, int bufsize) "Invalid available size, size=%d bufsize=%d" + +# net/vhost-user.c +vhost_user_event(const char *chr, int event) "chr: %s got event: %d" -- 2.4.3