Received: from eggs.gnu.org ([2001:4830:134:3::10]:46620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8BNq-0001nk-OL for qemu-devel@nongnu.org; Thu, 25 Jun 2015 13:56:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8BNl-0003DP-8u for qemu-devel@nongnu.org; Thu, 25 Jun 2015 13:56:18 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <558C2852.3050102@redhat.com> Date: Thu, 25 Jun 2015 13:56:07 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <47B5E901-9CCD-4737-A5F2-B790EBEF941A@gmail.com> References: <3B3C7431-1003-4AAA-90AF-0E1A154DFBE2@gmail.com> <5589A026.5020800@redhat.com> <455CF92B-58FA-446D-9EB0-42661C23B739@gmail.com> <87pp4kxos3.fsf@blackfin.pond.sub.org> <7B989F99-B95C-4D53-AA2D-29B87634D2BB@gmail.com> <558C22BD.1020404@redhat.com> <558C2852.3050102@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: Kevin Wolf , Peter Maydell , Qemu-block , qemu-devel qemu-devel , Markus Armbruster , Paolo Bonzini On Jun 25, 2015, at 12:12 PM, Laurent Vivier wrote: >=20 >=20 > On 25/06/2015 17:48, Paolo Bonzini wrote: >>=20 >> On 25/06/2015 17:32, Programmingkid wrote: >>>> I think we are going to have to agree to disagree. I have never >>>> used the /dev/sr(0 | 1) devices and don't see how they would be >>>> effected by this patch. Are you trying to say the /dev/sr(0 | 1) >>>> devices *should* be handled by this patch? >>>=20 >>> Thinking about your question some more, I see what you mean. On = Linux >>> /dev/sr0 refers to the cdrom drive. Also on Linux, the /dev/cdrom >>> link refers to the /dev/sr0 device file. So if you just use >>> /dev/cdrom, you are good. >>=20 >> Well, that's not how things work. >>=20 >> If you do things like that, you end up with a bunch of hacks, not = with a >> decent piece of software. >>=20 >> There is support for CD-ROM passthrough on Linux and FreeBSD in >> block/raw-posix.c. Perhaps the FreeBSD support can be extended to OS = X >> as well. >>=20 >=20 > In fact, programmingkid, you should fix it in hdev_open() where there = is > already a #if __APPLE__ . Nice to hear from you again Laurent. The only way a solution in = hdev_open() would work is if it could prevent find_image_format() from = executing. Otherwise find_image_format() would just quit QEMU with an = error.