From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: [PATCH] stubdom: fix select after CDROM ejection Date: Tue, 11 Mar 2008 18:41:53 +0000 Message-ID: <20080311184153.GH5831@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org stubdom: fix select calls after CDROM ejection by calling qemu_set_fd_handler before closing the fd. Signed-off-by: Samuel Thibault diff -r c149cedf76b9 tools/ioemu/block-vbd.c --- a/tools/ioemu/block-vbd.c Tue Mar 11 17:47:01 2008 +0000 +++ b/tools/ioemu/block-vbd.c Tue Mar 11 18:33:15 2008 +0000 @@ -271,6 +271,7 @@ static void vbd_close(BlockDriverState * BDRVVbdState *s = bs->opaque; bs->total_sectors = 0; if (s->fd >= 0) { + qemu_set_fd_handler(s->fd, NULL, NULL, NULL); close(s->fd); s->fd = -1; }