From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz86Z-0000eU-0i for qemu-devel@nongnu.org; Sun, 31 May 2015 14:37:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yz86Y-0005T0-5t for qemu-devel@nongnu.org; Sun, 31 May 2015 14:37:02 -0400 Date: Sun, 31 May 2015 20:36:55 +0200 From: "Michael S. Tsirkin" Message-ID: <1433097192-8988-42-git-send-email-mst@redhat.com> References: <1433097192-8988-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433097192-8988-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 41/57] 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 Cc: Kevin Wolf , Peter Maydell , Eduardo Habkost , qemu-block@nongnu.org, Laszlo Ersek , Markus Armbruster , "Gabriel L. Somlo" , Gerd Hoffmann , Paolo Bonzini , John Snow , Richard Henderson From: Laszlo Ersek 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Markus Armbruster --- hw/i386/pc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index b2fc501..1eb1db0 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; } -- MST