Message ID | 4BE16851.2040603@redhat.com |
---|---|
State | New |
Headers | show |
Am 05.05.2010 14:45, schrieb Kevin Wolf: > Am 04.05.2010 22:58, schrieb Stefan Weil: >> This patch (commit 84a12e6648444f517055138a7d7f25a22d7e1029) >> breaks QEMU for Win32: >> >> QEMU can no longer access \\.\PhysicalDrive0 - a feature I use quite >> often. >> >> Found by git bisect, tested like this: qemu \\.\PhysicalDrive0 > > Does the attached patch fix the problem? > > Kevin Yes, the patch fixes the problem. It needs a small modification to compile for non-win32 systems. Stefan
diff --git a/block.c b/block.c index 48305b7..1db8473 100644 --- a/block.c +++ b/block.c @@ -290,13 +290,13 @@ static BlockDriver *find_protocol(const char *filename) /* TODO Drivers without bdrv_file_open must be specified explicitly */ + p = strchr(filename, ':'); + if (!p || #ifdef _WIN32 - if (is_windows_drive(filename) || + is_windows_drive(filename) || is_windows_drive_prefix(filename)) - return bdrv_find_format("file"); #endif - p = strchr(filename, ':'); - if (!p) { + { drv1 = find_hdev_driver(filename); if (!drv1) { drv1 = bdrv_find_format("file");