From patchwork Fri Jun 12 12:57:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 483571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D30BD1401DA for ; Fri, 12 Jun 2015 23:04:32 +1000 (AEST) Received: from localhost ([::1]:51202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3OdK-00081p-Vu for incoming@patchwork.ozlabs.org; Fri, 12 Jun 2015 09:04:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3OXD-0001yM-8h for qemu-devel@nongnu.org; Fri, 12 Jun 2015 08:58:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3OXC-0007Bl-AU for qemu-devel@nongnu.org; Fri, 12 Jun 2015 08:58:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3OXB-0007Bd-UH for qemu-devel@nongnu.org; Fri, 12 Jun 2015 08:58:10 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 81EEE385A7B; Fri, 12 Jun 2015 12:58:09 +0000 (UTC) Received: from localhost (ovpn-112-61.ams2.redhat.com [10.36.112.61]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5CCw8f9015256; Fri, 12 Jun 2015 08:58:08 -0400 From: Stefan Hajnoczi To: Date: Fri, 12 Jun 2015 13:57:37 +0100 Message-Id: <1434113861-26495-13-git-send-email-stefanha@redhat.com> In-Reply-To: <1434113861-26495-1-git-send-email-stefanha@redhat.com> References: <1434113861-26495-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Fam Zheng , Stefan Hajnoczi Subject: [Qemu-devel] [PULL 12/16] iohandler: Change return type of qemu_set_fd_handler to "void" 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Fam Zheng Signed-off-by: Fam Zheng Message-id: 1433400324-7358-14-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi --- include/qemu/main-loop.h | 8 ++++---- iohandler.c | 9 ++++----- stubs/set-fd-handler.c | 8 ++++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 7da1d63..0f4a0fd 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -198,10 +198,10 @@ typedef int IOCanReadHandler(void *opaque); * * @opaque: A pointer-sized value that is passed to @fd_read and @fd_write. */ -int qemu_set_fd_handler(int fd, - IOHandler *fd_read, - IOHandler *fd_write, - void *opaque); +void qemu_set_fd_handler(int fd, + IOHandler *fd_read, + IOHandler *fd_write, + void *opaque); #ifdef CONFIG_POSIX /** diff --git a/iohandler.c b/iohandler.c index d361cf2..826f713 100644 --- a/iohandler.c +++ b/iohandler.c @@ -45,10 +45,10 @@ typedef struct IOHandlerRecord { static QLIST_HEAD(, IOHandlerRecord) io_handlers = QLIST_HEAD_INITIALIZER(io_handlers); -int qemu_set_fd_handler(int fd, - IOHandler *fd_read, - IOHandler *fd_write, - void *opaque) +void qemu_set_fd_handler(int fd, + IOHandler *fd_read, + IOHandler *fd_write, + void *opaque) { IOHandlerRecord *ioh; @@ -77,7 +77,6 @@ int qemu_set_fd_handler(int fd, ioh->deleted = 0; qemu_notify_event(); } - return 0; } void qemu_iohandler_fill(GArray *pollfds) diff --git a/stubs/set-fd-handler.c b/stubs/set-fd-handler.c index a895e62..a8481bc 100644 --- a/stubs/set-fd-handler.c +++ b/stubs/set-fd-handler.c @@ -1,10 +1,10 @@ #include "qemu-common.h" #include "qemu/main-loop.h" -int qemu_set_fd_handler(int fd, - IOHandler *fd_read, - IOHandler *fd_write, - void *opaque) +void qemu_set_fd_handler(int fd, + IOHandler *fd_read, + IOHandler *fd_write, + void *opaque) { abort(); }