aboutsummaryrefslogtreecommitdiff
path: root/net/slirp.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-14 16:36:33 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 00:43:30 +0100
commit2addc8fb6dac59b7232c65d1d43ec4bdd0b73420 (patch)
tree5051e830ecee3e24a048fdcc4de818ed54da0f12 /net/slirp.c
parent2afbb788ff43c5cb5a91fb3da9cae6bd9a70731f (diff)
slirp: add a callback to log guest errors
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'net/slirp.c')
-rw-r--r--net/slirp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 031c324f02..ea8b04e007 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/log.h"
#include "net/slirp.h"
@@ -140,8 +141,14 @@ static NetClientInfo net_slirp_info = {
.cleanup = net_slirp_cleanup,
};
+static void net_slirp_guest_error(const char *msg)
+{
+ qemu_log_mask(LOG_GUEST_ERROR, "%s", msg);
+}
+
static const SlirpCb slirp_cb = {
.output = net_slirp_output,
+ .guest_error = net_slirp_guest_error,
};
static int net_slirp_init(NetClientState *peer, const char *model,