From patchwork Fri Mar 11 10:04:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 8564101 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CED209F46A for ; Fri, 11 Mar 2016 10:13:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35A4120272 for ; Fri, 11 Mar 2016 10:13:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7901B20328 for ; Fri, 11 Mar 2016 10:13:36 +0000 (UTC) Received: from localhost ([::1]:53875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeK4d-0002Wl-R9 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Mar 2016 05:13:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeJvy-0003s5-4G for qemu-devel@nongnu.org; Fri, 11 Mar 2016 05:04:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeJvv-0001ja-Fq for qemu-devel@nongnu.org; Fri, 11 Mar 2016 05:04:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeJvv-0001jW-Ay for qemu-devel@nongnu.org; Fri, 11 Mar 2016 05:04:35 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id F326D64D19; Fri, 11 Mar 2016 10:04:34 +0000 (UTC) Received: from t530wlan.home.berrange.com.com (vpn1-6-25.ams2.redhat.com [10.36.6.25]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2BA4Kqp022231; Fri, 11 Mar 2016 05:04:34 -0500 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Fri, 11 Mar 2016 10:04:02 +0000 Message-Id: <1457690648-19267-13-git-send-email-berrange@redhat.com> In-Reply-To: <1457690648-19267-1-git-send-email-berrange@redhat.com> References: <1457690648-19267-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 11 Mar 2016 10:04:35 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: Peter Maydell Subject: [Qemu-devel] [PULL v1 12/18] io: remove checking of EWOULDBLOCK X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since we now canonicalize WSAEWOULDBLOCK into EAGAIN there is no longer any need to explicitly check EWOULDBLOCK for Win32. Signed-off-by: Daniel P. Berrange --- io/channel-command.c | 6 ++---- io/channel-file.c | 6 ++---- io/channel-socket.c | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/io/channel-command.c b/io/channel-command.c index f53ce0f..604514a 100644 --- a/io/channel-command.c +++ b/io/channel-command.c @@ -236,8 +236,7 @@ static ssize_t qio_channel_command_readv(QIOChannel *ioc, retry: ret = readv(cioc->readfd, iov, niov); if (ret < 0) { - if (errno == EAGAIN || - errno == EWOULDBLOCK) { + if (errno == EAGAIN) { return QIO_CHANNEL_ERR_BLOCK; } if (errno == EINTR) { @@ -265,8 +264,7 @@ static ssize_t qio_channel_command_writev(QIOChannel *ioc, retry: ret = writev(cioc->writefd, iov, niov); if (ret <= 0) { - if (errno == EAGAIN || - errno == EWOULDBLOCK) { + if (errno == EAGAIN) { return QIO_CHANNEL_ERR_BLOCK; } if (errno == EINTR) { diff --git a/io/channel-file.c b/io/channel-file.c index 19a4325..f28e2b0 100644 --- a/io/channel-file.c +++ b/io/channel-file.c @@ -96,8 +96,7 @@ static ssize_t qio_channel_file_readv(QIOChannel *ioc, retry: ret = readv(fioc->fd, iov, niov); if (ret < 0) { - if (errno == EAGAIN || - errno == EWOULDBLOCK) { + if (errno == EAGAIN) { return QIO_CHANNEL_ERR_BLOCK; } if (errno == EINTR) { @@ -125,8 +124,7 @@ static ssize_t qio_channel_file_writev(QIOChannel *ioc, retry: ret = writev(fioc->fd, iov, niov); if (ret <= 0) { - if (errno == EAGAIN || - errno == EWOULDBLOCK) { + if (errno == EAGAIN) { return QIO_CHANNEL_ERR_BLOCK; } if (errno == EINTR) { diff --git a/io/channel-socket.c b/io/channel-socket.c index 9b5f2d8..2387d97 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -466,8 +466,7 @@ static ssize_t qio_channel_socket_readv(QIOChannel *ioc, retry: ret = recvmsg(sioc->fd, &msg, sflags); if (ret < 0) { - if (socket_error() == EAGAIN || - socket_error() == EWOULDBLOCK) { + if (socket_error() == EAGAIN) { return QIO_CHANNEL_ERR_BLOCK; } if (socket_error() == EINTR) { @@ -526,8 +525,7 @@ static ssize_t qio_channel_socket_writev(QIOChannel *ioc, retry: ret = sendmsg(sioc->fd, &msg, 0); if (ret <= 0) { - if (socket_error() == EAGAIN || - socket_error() == EWOULDBLOCK) { + if (socket_error() == EAGAIN) { return QIO_CHANNEL_ERR_BLOCK; } if (socket_error() == EINTR) {