From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy42f-0000wn-8u for qemu-devel@nongnu.org; Thu, 28 May 2015 16:04:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy42e-0005hc-Co for qemu-devel@nongnu.org; Thu, 28 May 2015 16:04:37 -0400 From: Laszlo Ersek Date: Thu, 28 May 2015 22:04:09 +0200 Message-Id: <1432843451-9653-3-git-send-email-lersek@redhat.com> In-Reply-To: <1432843451-9653-1-git-send-email-lersek@redhat.com> References: <1432843451-9653-1-git-send-email-lersek@redhat.com> Subject: [Qemu-devel] [PATCH v2 2/4] i386/pc: '-drive if=floppy' should imply a board-default FDC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, lersek@redhat.com Cc: Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , "Gabriel L. Somlo" , Gerd Hoffmann , Paolo Bonzini , John Snow Even if board code decides not to request the creation of the FDC (keyed off board-level factors, to be determined later), we should create the FDC nevertheless if the user passes '-drive if=floppy' on the command line. Otherwise '-drive if=floppy' would break without explicit '-device isa-fdc' on such boards. Cc: Markus Armbruster Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: John Snow Cc: "Gabriel L. Somlo" Cc: "Michael S. Tsirkin" Cc: Kevin Wolf Cc: qemu-block@nongnu.org Signed-off-by: Laszlo Ersek --- Notes: v2: - separate this "magic" out to a standalone patch [Markus, Michael] hw/i386/pc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a49323d..90fb309 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1490,6 +1490,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, for(i = 0; i < MAX_FD; i++) { fd[i] = drive_get(IF_FLOPPY, 0, i); + create_fdctrl |= !!fd[i]; } *floppy = create_fdctrl ? fdctrl_init_isa(isa_bus, fd) : NULL; } -- 1.8.3.1