aboutsummaryrefslogtreecommitdiff
path: root/block/raw-win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r--block/raw-win32.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 1e95153d56..72acad58f9 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -306,6 +306,15 @@ static int find_device_type(BlockDriverState *bs, const char *filename)
}
}
+static int hdev_probe_device(const char *filename)
+{
+ if (strstart(filename, "/dev/cdrom", NULL))
+ return 100;
+ if (is_windows_drive(filename))
+ return 100;
+ return 0;
+}
+
static int hdev_open(BlockDriverState *bs, const char *filename, int flags)
{
BDRVRawState *s = bs->opaque;
@@ -391,6 +400,7 @@ static int raw_set_locked(BlockDriverState *bs, int locked)
static BlockDriver bdrv_host_device = {
.format_name = "host_device",
.instance_size = sizeof(BDRVRawState),
+ .bdrv_probe_device = hdev_probe_device,
.bdrv_open = hdev_open,
.bdrv_close = raw_close,
.bdrv_flush = raw_flush,