From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: [PATCH 07/12] kvm: qemu: Move some code around for the next commit Date: Mon, 11 Aug 2008 21:12:10 +0100 Message-ID: <1218485535-877-8-git-send-email-markmc@redhat.com> References: <1218485535-877-1-git-send-email-markmc@redhat.com> <1218485535-877-2-git-send-email-markmc@redhat.com> <1218485535-877-3-git-send-email-markmc@redhat.com> <1218485535-877-4-git-send-email-markmc@redhat.com> <1218485535-877-5-git-send-email-markmc@redhat.com> <1218485535-877-6-git-send-email-markmc@redhat.com> <1218485535-877-7-git-send-email-markmc@redhat.com> Cc: kvm@vger.kernel.org, Mark McLoughlin To: Avi Kivity Return-path: Received: from mail05.svc.cra.dublin.eircom.net ([159.134.118.21]:47242 "HELO mail05.svc.cra.dublin.eircom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757536AbYHKUMd (ORCPT ); Mon, 11 Aug 2008 16:12:33 -0400 In-Reply-To: <1218485535-877-7-git-send-email-markmc@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Mark McLoughlin --- 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