From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVEpY-0000DE-UP for qemu-devel@nongnu.org; Wed, 13 Jan 2010 20:49:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVEpT-0000B7-C6 for qemu-devel@nongnu.org; Wed, 13 Jan 2010 20:48:59 -0500 Received: from [199.232.76.173] (port=41184 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVEpS-0000B1-SG for qemu-devel@nongnu.org; Wed, 13 Jan 2010 20:48:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6316) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVEpS-0000KB-Dg for qemu-devel@nongnu.org; Wed, 13 Jan 2010 20:48:54 -0500 Message-ID: <4B4E77F6.1040205@redhat.com> Date: Wed, 13 Jan 2010 20:48:38 -0500 From: Cole Robinson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v3] raw-posix: Detect CDROM via ioctl References: <1263426345-13558-1-git-send-email-crobinso@redhat.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org On 01/13/2010 07:11 PM, malc wrote: > On Wed, 13 Jan 2010, Cole Robinson wrote: > >> Current CDROM detection is hardcoded based on source file name. >> Make this smarter by attempting a CDROM specific ioctl. >> >> This makes '-cdrom /dev/sr0' succeed with no media present. >> >> v2: >> Give ioctl check higher priority than filename check, >> >> v3: >> Actually initialize 'prio' variable >> Check for ioctl success rather than absence of specific failure > > Does it even compile on BSDs, Darwin etc? > The changed functions are all under #ifdef __linux__, so I assume its fine. Haven't tested though. - Cole