From 463af5349a787160642f023dad10eaf0cb419fb7 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Mon, 18 May 2009 12:55:27 +0100 Subject: net: add fd_readv() handler to qemu_new_vlan_client() args This, apparently, is the style we prefer - all VLANClientState should be an argument to qemu_new_vlan_client(). Signed-off-by: Mark McLoughlin --- hw/qdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'hw/qdev.c') diff --git a/hw/qdev.c b/hw/qdev.c index 689cf4cf93..90b42532a5 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -258,15 +258,16 @@ void qdev_connect_gpio_out(DeviceState * dev, int n, qemu_irq pin) } VLANClientState *qdev_get_vlan_client(DeviceState *dev, - IOReadHandler *fd_read, IOCanRWHandler *fd_can_read, + IOReadHandler *fd_read, + IOReadvHandler *fd_readv, NetCleanup *cleanup, void *opaque) { NICInfo *nd = dev->nd; assert(nd); - return qemu_new_vlan_client(nd->vlan, nd->model, nd->name, - fd_read, fd_can_read, cleanup, opaque); + return qemu_new_vlan_client(nd->vlan, nd->model, nd->name, fd_can_read, + fd_read, fd_readv, cleanup, opaque); } -- cgit v1.2.3 From cda9046ba7dbba45f3016e5d60caffa2d72960fa Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Mon, 18 May 2009 13:13:16 +0100 Subject: net: re-name vc->fd_read() to vc->receive() VLANClientState's fd_read() handler doesn't read from file descriptors, it adds a buffer to the client's receive queue. Re-name the handlers to make things a little less confusing. Signed-off-by: Mark McLoughlin --- hw/qdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hw/qdev.c') diff --git a/hw/qdev.c b/hw/qdev.c index 90b42532a5..bab351c12f 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -258,16 +258,16 @@ void qdev_connect_gpio_out(DeviceState * dev, int n, qemu_irq pin) } VLANClientState *qdev_get_vlan_client(DeviceState *dev, - IOCanRWHandler *fd_can_read, - IOReadHandler *fd_read, - IOReadvHandler *fd_readv, + NetCanReceive *can_receive, + NetReceive *receive, + NetReceiveIOV *receive_iov, NetCleanup *cleanup, void *opaque) { NICInfo *nd = dev->nd; assert(nd); - return qemu_new_vlan_client(nd->vlan, nd->model, nd->name, fd_can_read, - fd_read, fd_readv, cleanup, opaque); + return qemu_new_vlan_client(nd->vlan, nd->model, nd->name, can_receive, + receive, receive_iov, cleanup, opaque); } -- cgit v1.2.3