Commit 3060cd14c25c9243e1d76fc07a2e67314760aba7

Authored by aliguori
1 parent e7a6965b

Fix find_device_type() to correctly identify floppy disk devices; (Luca Tettamanti)

they are reported as DRIVE_REMOVABLE by win32.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7010 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 2 deletions
block-raw-win32.c
... ... @@ -280,10 +280,15 @@ static int find_device_type(BlockDriverState *bs, const char *filename)
280 280 return FTYPE_HARDDISK;
281 281 snprintf(s->drive_path, sizeof(s->drive_path), "%c:\\", p[0]);
282 282 type = GetDriveType(s->drive_path);
283   - if (type == DRIVE_CDROM)
  283 + switch (type) {
  284 + case DRIVE_REMOVABLE:
  285 + case DRIVE_FIXED:
  286 + return FTYPE_HARDDISK;
  287 + case DRIVE_CDROM:
284 288 return FTYPE_CD;
285   - else
  289 + default:
286 290 return FTYPE_FILE;
  291 + }
287 292 } else {
288 293 return FTYPE_FILE;
289 294 }
... ...