[PATCH 07/12] kvm: qemu: Move some code around for the next commit

Mark McLoughlin
2008-08-11T20:12:33Z

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
qemu/vl.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/qemu/vl.c b/qemu/vl.c
index 126944d..f5aacf0 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -4369,19 +4369,6 @@ typedef struct TAPState {
unsigned int has_vnet_hdr : 1;
} TAPState;

-static void tap_receive(void *opaque, const uint8_t *buf, int size)
-{
- TAPState *s = opaque;
- int ret;
- for(;;) {
- ret = write(s->fd, buf, size);
- if (ret < 0 && (errno == EINTR || errno == EAGAIN)) {
- } else {
- break;
- }
- }
-}
-
static ssize_t tap_receive_iov(void *opaque, const struct iovec *iov,
int iovcnt)
{
@@ -4395,6 +4382,19 @@ static ssize_t tap_receive_iov(void *opaque, const struct iovec *iov,
return len;
}

+static void tap_receive(void *opaque, const uint8_t *buf, int size)
+{
+ TAPState *s = opaque;
+ int ret;
+ for(;;) {
+ ret = write(s->fd, buf, size);
+ if (ret < 0 && (errno == EINTR || errno == EAGAIN)) {
+ } else {
+ break;
+ }
+ }
+}
+
static int tap_can_send(void *opaque)
{
TAPState *s = opaque;
--
1.5.4.1