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
This commit is contained in:
parent
e7a6965b5a
commit
3060cd14c2
|
@ -280,10 +280,15 @@ static int find_device_type(BlockDriverState *bs, const char *filename)
|
||||||
return FTYPE_HARDDISK;
|
return FTYPE_HARDDISK;
|
||||||
snprintf(s->drive_path, sizeof(s->drive_path), "%c:\\", p[0]);
|
snprintf(s->drive_path, sizeof(s->drive_path), "%c:\\", p[0]);
|
||||||
type = GetDriveType(s->drive_path);
|
type = GetDriveType(s->drive_path);
|
||||||
if (type == DRIVE_CDROM)
|
switch (type) {
|
||||||
|
case DRIVE_REMOVABLE:
|
||||||
|
case DRIVE_FIXED:
|
||||||
|
return FTYPE_HARDDISK;
|
||||||
|
case DRIVE_CDROM:
|
||||||
return FTYPE_CD;
|
return FTYPE_CD;
|
||||||
else
|
default:
|
||||||
return FTYPE_FILE;
|
return FTYPE_FILE;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return FTYPE_FILE;
|
return FTYPE_FILE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue