From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55398 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdNeP-0003Bs-Lk for qemu-devel@nongnu.org; Thu, 13 Jan 2011 08:55:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdNeO-000727-Et for qemu-devel@nongnu.org; Thu, 13 Jan 2011 08:55:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdNeO-00071w-4H for qemu-devel@nongnu.org; Thu, 13 Jan 2011 08:55:40 -0500 Message-ID: <4D2F044D.7020709@redhat.com> Date: Thu, 13 Jan 2011 14:55:25 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1bdf0a5a5de06cfb332ac17c439ef79cabb835db.1294923288.git.amit.shah@redhat.com> In-Reply-To: <1bdf0a5a5de06cfb332ac17c439ef79cabb835db.1294923288.git.amit.shah@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 3/5] iohandlers: Allow each iohandler to be enabled/disabled individually List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu list , Paul Brook On 01/13/11 14:00, Amit Shah wrote: > { > - return assign_fd_handlers(fd, fd_read_poll, fd_read, fd_write, opaque); > + assign_fd_handlers(fd, fd_read_poll, fd_read, fd_write, opaque); > + set_read_poll_fd_action(fd, true); > + set_read_fd_action(fd, true); > + set_write_fd_action(fd, true); > + return 0; > } I'd suggest to move the *action calls into assign_fd_handlers() so the handlers default to being enabled in all cases. This should match what most users need and thus minimize the number of *_action calls needed. cheers, Gerd