From patchwork Tue Jul 10 09:12:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 170094 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 51D532C0084 for ; Tue, 10 Jul 2012 19:20:35 +1000 (EST) Received: from localhost ([::1]:42130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoWcT-0001W0-19 for incoming@patchwork.ozlabs.org; Tue, 10 Jul 2012 05:20:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoWbt-0000jh-MA for qemu-devel@nongnu.org; Tue, 10 Jul 2012 05:20:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoWbl-0004KD-Fs for qemu-devel@nongnu.org; Tue, 10 Jul 2012 05:19:57 -0400 Received: from oxygen.pond.sub.org ([78.46.104.156]:58069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoWbl-0004Jp-9e for qemu-devel@nongnu.org; Tue, 10 Jul 2012 05:19:49 -0400 Received: from blackfin.pond.sub.org (p57B0F62B.dip.t-dialin.net [87.176.246.43]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 904ACA401D; Tue, 10 Jul 2012 11:19:47 +0200 (CEST) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id 8FB4B600B5; Tue, 10 Jul 2012 11:12:57 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 10 Jul 2012 11:12:51 +0200 Message-Id: <1341911575-7306-26-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.7.6.5 In-Reply-To: <1341911575-7306-1-git-send-email-armbru@redhat.com> References: <1341911575-7306-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 78.46.104.156 Cc: kwolf@redhat.com, blauwirbel@gmail.com, stefanha@linux.vnet.ibm.com, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH v3 25/29] ide pc: Put hard disk info into CMOS only for hard disks X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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; }