ide pc: Put hard disk info into CMOS only for hard disks

In particular, don't set disk type and geometry when a CD-ROM on bus
ide.0 has media during CMOS initialization.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Markus Armbruster 2012-07-10 11:12:51 +02:00 committed by Kevin Wolf
parent 2b584959ed
commit 9dc13e3813

View File

@ -117,7 +117,7 @@ int ide_get_geometry(BusState *bus, int unit,
{
IDEState *s = &DO_UPCAST(IDEBus, qbus, bus)->ifs[unit];
if (!s->bs) {
if (s->drive_kind != IDE_HD || !s->bs) {
return -1;
}