mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
2afbb788ff
commit
2addc8fb6d
4 changed files with 15 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue