From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVSH2-00069Q-4P for qemu-devel@nongnu.org; Thu, 14 Jan 2010 11:10:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVSGx-00066Y-GA for qemu-devel@nongnu.org; Thu, 14 Jan 2010 11:10:15 -0500 Received: from [199.232.76.173] (port=47562 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVSGx-00066P-8h for qemu-devel@nongnu.org; Thu, 14 Jan 2010 11:10:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36904) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVSGw-0004vj-Q9 for qemu-devel@nongnu.org; Thu, 14 Jan 2010 11:10:11 -0500 Message-ID: <4B4F41D1.3060306@redhat.com> Date: Thu, 14 Jan 2010 11:09:53 -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> <4B4E77F6.1040205@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/14/2010 05:45 AM, malc wrote: > On Wed, 13 Jan 2010, Cole Robinson wrote: > >> 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. > > Fine if so, it's not immediatelly aparent from the patches nor from > the commit messages though. > True. I'll resend with a better commit message. Thanks, Cole