From patchwork Thu May 24 09:02:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Hrdina X-Patchwork-Id: 161080 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 1EFC6B6FA1 for ; Thu, 24 May 2012 19:02:52 +1000 (EST) Received: from localhost ([::1]:40922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXTwY-000714-14 for incoming@patchwork.ozlabs.org; Thu, 24 May 2012 05:02:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXTwO-0006zW-BE for qemu-devel@nongnu.org; Thu, 24 May 2012 05:02:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXTwJ-0008G2-I0 for qemu-devel@nongnu.org; Thu, 24 May 2012 05:02:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXTwJ-0008FL-AI for qemu-devel@nongnu.org; Thu, 24 May 2012 05:02:35 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4O92XW7020174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 24 May 2012 05:02:33 -0400 Received: from antique-laptop.brq.redhat.com (dhcp-27-171.brq.redhat.com [10.34.27.171]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4O92Uxe017683; Thu, 24 May 2012 05:02:32 -0400 From: Pavel Hrdina To: qemu-devel@nongnu.org Date: Thu, 24 May 2012 11:02:28 +0200 Message-Id: <1cab04f5945f130fad0d576378d71acd36c0c13e.1337849630.git.phrdina@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, pbonzini@redhat.com, Pavel Hrdina Subject: [Qemu-devel] [PATCH v4 1/3] fdc: floppy drive should be visible after start without media 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 If you start guest with floppy drive but without media inserted, guest still should see floppy drive pressent. Signed-off-by: Pavel Hrdina --- hw/pc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 4d34a33..967c17a 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -382,7 +382,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, if (floppy) { fdc_get_bs(fd, floppy); for (i = 0; i < 2; i++) { - if (fd[i] && bdrv_is_inserted(fd[i])) { + if (fd[i]) { bdrv_get_floppy_geometry_hint(fd[i], &nb_heads, &max_track, &last_sect, FDRIVE_DRV_NONE, &fd_type[i], &rate);