mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
slirp: remove Monitor dependency, return a string for info
There is nothing performance-sensitive in returning an allocated string for info, and handling the monitor_printf() on the caller side. 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:
committed by
Samuel Thibault
parent
634d03487b
commit
b7f43bf2f6
@ -828,10 +828,11 @@ void hmp_info_usernet(Monitor *mon, const QDict *qdict)
|
||||
QTAILQ_FOREACH(s, &slirp_stacks, entry) {
|
||||
int id;
|
||||
bool got_hub_id = net_hub_id_for_client(&s->nc, &id) == 0;
|
||||
monitor_printf(mon, "Hub %d (%s):\n",
|
||||
char *info = slirp_connection_info(s->slirp);
|
||||
monitor_printf(mon, "Hub %d (%s):\n%s",
|
||||
got_hub_id ? id : -1,
|
||||
s->nc.name);
|
||||
slirp_connection_info(s->slirp, mon);
|
||||
s->nc.name, info);
|
||||
g_free(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user