qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 27/41] ide pc: Put hard disk info into CMOS only for


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 27/41] ide pc: Put hard disk info into CMOS only for hard disks
Date: Tue, 17 Jul 2012 18:00:24 +0200

From: Markus Armbruster <address@hidden>

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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 hw/ide/qdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index f191dd3..84097fd 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -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;
     }
 
-- 
1.7.6.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]