aboutsummaryrefslogtreecommitdiffstats
path: root/blockdev.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-05-16 15:04:56 +0200
committerKevin Wolf <kwolf@redhat.com>2011-05-19 10:26:21 +0200
commit95b5edcd92d64c7b8fe9f2e3e0725fdf84be0dfa (patch)
tree114ca4bf6d4715c6144d35e2c111be77cdecfeec /blockdev.c
parentd8aeeb31d53a07a0cce36c7bcf53684953c2e445 (diff)
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 <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c
index 5429621f0..28727dfe2 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -488,6 +488,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
break;
case MEDIA_CDROM:
bdrv_set_type_hint(dinfo->bdrv, BDRV_TYPE_CDROM);
+ dinfo->media_cd = 1;
break;
}
break;