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:
Luiz Capitulino 2012-04-12 13:20:40 -03:00
parent 60d5666f7d
commit 42dcc547e1
15 changed files with 27 additions and 43 deletions

View file

@ -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;
}