aboutsummaryrefslogtreecommitdiff
path: root/block-raw-win32.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 01:24:53 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 01:24:53 +0000
commit3060cd14c25c9243e1d76fc07a2e67314760aba7 (patch)
tree5c8d9baba6962787f7a9599cb6717e21350579ad /block-raw-win32.c
parente7a6965b5a327c4136bad8df582e8acc08db9eff (diff)
downloadqemu-3060cd14c25c9243e1d76fc07a2e67314760aba7.zip
qemu-3060cd14c25c9243e1d76fc07a2e67314760aba7.tar.gz
qemu-3060cd14c25c9243e1d76fc07a2e67314760aba7.tar.bz2
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
Diffstat (limited to 'block-raw-win32.c')
-rw-r--r--block-raw-win32.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/block-raw-win32.c b/block-raw-win32.c
index af9cc6d..e7dc685 100644
--- a/block-raw-win32.c
+++ b/block-raw-win32.c
@@ -280,10 +280,15 @@ static int find_device_type(BlockDriverState *bs, const char *filename)
return FTYPE_HARDDISK;
snprintf(s->drive_path, sizeof(s->drive_path), "%c:\\", p[0]);
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;
- else
+ default:
return FTYPE_FILE;
+ }
} else {
return FTYPE_FILE;
}