From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNIbR-0000Be-Ia for qemu-devel@nongnu.org; Mon, 16 Feb 2015 05:08:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNIbO-0007oq-0k for qemu-devel@nongnu.org; Mon, 16 Feb 2015 05:08:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNIbN-0007oj-JZ for qemu-devel@nongnu.org; Mon, 16 Feb 2015 05:08:29 -0500 Date: Mon, 16 Feb 2015 11:08:21 +0100 From: Kevin Wolf Message-ID: <20150216100821.GA4079@noname.str.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Machine menu patch for Mac OS X List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Programmingkid , qemu-devel qemu-devel , Stefan Hajnoczi Am 14.02.2015 um 03:28 hat Peter Maydell geschrieben: > On 14 February 2015 at 01:43, Programmingkid wrote: > > Added features: > > Menu items to switch floppy and CD image files. > > Menu items to eject floppy and CD image files. > > Menu item to use /dev/cdrom. > > Verifies with the user before quitting QEMU by displaying a dialog box. > > > > Signed-off-by: John Arbuckle > > Stefan, Kevin -- could you review the bits of this patch > which determine whether the machine has a floppy/cdrom > drive and if so let the user insert/inject it, please? > (that's the emulatorHasDevice and ejectFloppy/changeFloppy > functions, mostly). I don't know the block layer APIs so > I can't really say if this patch is doing it in the best/ > non-deprecated/etc way or not... Well, it's trying to detect the floppy/cdrom device by comparing string with default IDs that can be overridden by the user, so no, that's probably far from the best way to do it. The code also doesn't consider that you could have more than one floppy or cdrom drive. The correct way is probably to just display any removable block device, and ideally also to implement some notifiers to deal with hotplug. Kevin