From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lr9k8-0004m0-7c for qemu-devel@nongnu.org; Tue, 07 Apr 2009 07:45:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lr9k2-0004jG-LC for qemu-devel@nongnu.org; Tue, 07 Apr 2009 07:45:27 -0400 Received: from [199.232.76.173] (port=46853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lr9k2-0004j4-5d for qemu-devel@nongnu.org; Tue, 07 Apr 2009 07:45:22 -0400 Received: from fk-out-0910.google.com ([209.85.128.190]:23631) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lr9k1-0003sv-QW for qemu-devel@nongnu.org; Tue, 07 Apr 2009 07:45:22 -0400 Received: by fk-out-0910.google.com with SMTP id z22so982783fkz.2 for ; Tue, 07 Apr 2009 04:45:19 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <49DAB05E.5020906@us.ibm.com> References: <49C16D71.7020104@bttr-software.de> <49C41240.8030102@codemonkey.ws> <68676e00903211507o79e84b73j79d63dd03b7750f2@mail.gmail.com> <49DAB05E.5020906@us.ibm.com> Date: Tue, 7 Apr 2009 13:45:19 +0200 Message-ID: <68676e00904070445v10efa8dciea08a5bf0d3b3eff@mail.gmail.com> Subject: Re: [Qemu-devel] r6677 broke access to physical FDD on Win32 From: Luca Tettamanti Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori On Tue, Apr 7, 2009 at 3:46 AM, Anthony Liguori wrote= : > Luca Tettamanti wrote: >> The bug is here: >> =C2=A0type =3D GetDriveType(s->drive_path); >> =C2=A0if (type =3D=3D DRIVE_CDROM) >> =C2=A0 =C2=A0return FTYPE_CD; >> =C2=A0else >> =C2=A0 =C2=A0return FTYPE_FILE; >> >> GetDriveType("a:") returns DRIVE_REMOVABLE, which according to MSDN >> means "The drive has removable media; for example, a floppy drive, >> thumb drive, or flash card reader."; the code is not expecting such a >> value so it sets the type to FTYPE_FILE; raw_getlength() then uses >> GetFileSize() which of course fails... >> >> Here's a patch for properly handling the return value of GetDriveType >> (sorry for the attachment, but I'm currently using a remote VM over >> RDP and don't have a decent mailer installed). >> > > Applied. =C2=A0Thanks. There is also this patch floating around: http://thread.gmane.org/gmane.comp.emulators.qemu/39851 which also addresses the lack of FILE_SHARE_WRITE flag. Luca