From 95b5edcd92d64c7b8fe9f2e3e0725fdf84be0dfa Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 16 May 2011 15:04:56 +0200 Subject: blockdev: Store -drive option media in DriveInfo DriveInfo is closely tied to -drive, and like -drive, it mixes information about host and guest part of the block device. Unlike DriveInfo, BlockDriverState should be about the host part only. One of the remaining guest bits there is the "type hint". -drive option media sets it, and qdevs "ide-drive", "scsi-disk" and non-qdev IF_XEN devices check it to pick HD vs. CD. Communicate -drive option media via new DriveInfo member media_cd instead. Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- hw/xen_devconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/xen_devconfig.c') 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"; -- cgit v1.2.3-55-g7522