mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
net: purge the monitor object from all init functions
The only backend that really uses it is the socket one, which calls monitor_get_fd(). But it can use 'cur_mon' instead. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "config-host.h"
|
||||
|
||||
#include "net.h"
|
||||
#include "monitor.h"
|
||||
#include "qemu-char.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu-error.h"
|
||||
@@ -585,10 +586,7 @@ static int net_socket_udp_init(VLANState *vlan,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int net_init_socket(QemuOpts *opts,
|
||||
Monitor *mon,
|
||||
const char *name,
|
||||
VLANState *vlan)
|
||||
int net_init_socket(QemuOpts *opts, const char *name, VLANState *vlan)
|
||||
{
|
||||
if (qemu_opt_get(opts, "fd")) {
|
||||
int fd;
|
||||
@@ -601,7 +599,7 @@ int net_init_socket(QemuOpts *opts,
|
||||
return -1;
|
||||
}
|
||||
|
||||
fd = net_handle_fd_param(mon, qemu_opt_get(opts, "fd"));
|
||||
fd = net_handle_fd_param(cur_mon, qemu_opt_get(opts, "fd"));
|
||||
if (fd == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user