From: Marc-André Lureau <marcandre.lur...@redhat.com> Replace error_report() and use tracing instead. It's not an error to get a connection or a disconnection, so silence this and trace it instead.
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- net/vhost-user.c | 5 +++-- trace-events | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index 93dcecd..bbcd9ff 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; @@ -116,16 +117,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 88a2f14..1c4d61f 100644 --- a/trace-events +++ b/trace-events @@ -1685,3 +1685,7 @@ qcrypto_tls_creds_x509_load_cert_list(void *creds, const char *file) "TLS creds # crypto/tlssession.c qcrypto_tls_session_new(void *session, void *creds, const char *hostname, const char *aclname, int endpoint) "TLS session new session=%p creds=%p hostname=%s aclname=%s endpoint=%d" + +# net/vhost-user.c +vhost_user_event(const char *chr, int event) "chr: %s got event: %d" + -- 2.4.3