qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] r6677 broke access to physical FDD on Win32


From: Luca Tettamanti
Subject: Re: [Qemu-devel] r6677 broke access to physical FDD on Win32
Date: Tue, 7 Apr 2009 13:45:19 +0200

On Tue, Apr 7, 2009 at 3:46 AM, Anthony Liguori <address@hidden> wrote:
> Luca Tettamanti wrote:
>> The bug is here:
>>  type = GetDriveType(s->drive_path);
>>  if (type == DRIVE_CDROM)
>>    return FTYPE_CD;
>>  else
>>    return 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.  Thanks.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]