blockdev: Store -drive option media in DriveInfo
authorMarkus Armbruster <armbru@redhat.com>
Mon, 16 May 2011 13:04:56 +0000 (15:04 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 19 May 2011 08:26:21 +0000 (10:26 +0200)
commitda294fdfdd9604cf755cf58bc7a23436d7448034
tree114ca4bf6d4715c6144d35e2c111be77cdecfeec
parent95c43aea81a29b34b4f9271202aa2757cba8fb7d
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>
blockdev.c
blockdev.h
hw/ide/core.c
hw/ide/qdev.c
hw/scsi-disk.c
hw/xen_devconfig.c