aboutsummaryrefslogtreecommitdiff
path: root/hw/xen_devconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xen_devconfig.c')
-rw-r--r--hw/xen_devconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xen_devconfig.c b/hw/xen_devconfig.c
index 8d50216c04..3a9215566d 100644
--- a/hw/xen_devconfig.c
+++ b/hw/xen_devconfig.c
@@ -96,7 +96,7 @@ int xen_config_dev_blk(DriveInfo *disk)
{
char fe[256], be[256];
int vdev = 202 * 256 + 16 * disk->unit;
- int cdrom = disk->bdrv->type == BDRV_TYPE_CDROM;
+ int cdrom = disk->media_cd;
const char *devtype = cdrom ? "cdrom" : "disk";
const char *mode = cdrom ? "r" : "w";