From patchwork Thu Mar 19 15:16:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 452012 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EE9BE1400D5 for ; Fri, 20 Mar 2015 02:18:25 +1100 (AEDT) Received: from localhost ([::1]:39726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYcDH-00044z-TH for incoming@patchwork.ozlabs.org; Thu, 19 Mar 2015 11:18:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYcBd-00018y-SY for qemu-devel@nongnu.org; Thu, 19 Mar 2015 11:16:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYcBZ-00088a-OZ for qemu-devel@nongnu.org; Thu, 19 Mar 2015 11:16:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYcBS-00085a-2k; Thu, 19 Mar 2015 11:16:30 -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 (Postfix) with ESMTPS id E7A29A10CA; Thu, 19 Mar 2015 15:16:28 +0000 (UTC) Received: from noname.redhat.com (ovpn-116-54.ams2.redhat.com [10.36.116.54]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2JFGPnT020966; Thu, 19 Mar 2015 11:16:27 -0400 From: Kevin Wolf To: qemu-block@nongnu.org Date: Thu, 19 Mar 2015 16:16:12 +0100 Message-Id: <1426778174-1170-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1426778174-1170-1-git-send-email-kwolf@redhat.com> References: <1426778174-1170-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 1/3] raw-posix: Deprecate host floppy passthrough 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 From: Markus Armbruster Raise your hand if you have a physical floppy drive in a computer you've powered on in 2015. Okay, I see we got a few weirdos in the audience. That's okay, weirdos are welcome here. Kidding aside, media change detection doesn't fully work, isn't going to be fixed, and floppy passthrough just isn't earning its keep anymore. Deprecate block driver host_floppy now, so we can drop it after a grace period. Signed-off-by: Markus Armbruster Reviewed-by: Gerd Hoffmann Reviewed-by: Eric Blake Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/raw-posix.c | 2 ++ qapi/block-core.json | 2 ++ qemu-doc.texi | 5 +++-- qemu-options.hx | 3 +-- qmp-commands.hx | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index f0b4488..844ac21 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -2387,6 +2387,8 @@ static int floppy_open(BlockDriverState *bs, QDict *options, int flags, s->fd = -1; s->fd_media_changed = 1; + error_report("Host floppy pass-through is deprecated"); + error_printf("Support for it will be removed in a future release.\n"); return 0; } diff --git a/qapi/block-core.json b/qapi/block-core.json index 42c8850..ac839af 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -218,6 +218,7 @@ # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow', # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat' # 2.2: 'archipelago' added, 'cow' dropped +# 2.3: 'host_floppy' deprecated # # @backing_file: #optional the name of the backing file (for copy-on-write) # @@ -1245,6 +1246,7 @@ # Drivers that are supported in block device operations. # # @host_device, @host_cdrom, @host_floppy: Since 2.1 +# @host_floppy: deprecated since 2.3 # # Since: 2.0 ## diff --git a/qemu-doc.texi b/qemu-doc.texi index 8aa6dbf..0125bc7 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -736,8 +736,7 @@ devices. We describe here the usage for QEMU version >= 0.8.3. On Linux, you can directly use the host device filename instead of a disk image filename provided you have enough privileges to access -it. For example, use @file{/dev/cdrom} to access to the CDROM or -@file{/dev/fd0} for the floppy. +it. For example, use @file{/dev/cdrom} to access to the CDROM. @table @code @item CD @@ -749,6 +748,8 @@ You can specify a floppy device even if no floppy is loaded. Floppy removal is currently not detected accurately (if you change floppy without doing floppy access while the floppy is not loaded, the guest OS will think that the same floppy is loaded). +Use of the host's floppy device is deprecated, and support for it will +be removed in a future release. @item Hard disks Hard disks can be used. Normally you must specify the whole disk (@file{/dev/hdb} instead of @file{/dev/hdb1}) so that the guest OS can diff --git a/qemu-options.hx b/qemu-options.hx index c513352..ffaf327 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -419,8 +419,7 @@ STEXI @item -fdb @var{file} @findex -fda @findex -fdb -Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}). You can -use the host floppy by using @file{/dev/fd0} as filename (@pxref{host_drives}). +Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}). ETEXI DEF("hda", HAS_ARG, QEMU_OPTION_hda, diff --git a/qmp-commands.hx b/qmp-commands.hx index 0663924..faf75da 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -2154,7 +2154,7 @@ Each json-object contain the following: - "drv": driver format name (json-string) - Possible values: "blkdebug", "bochs", "cloop", "dmg", "file", "file", "ftp", "ftps", "host_cdrom", - "host_device", "host_floppy", "http", "https", + "host_device", "http", "https", "nbd", "parallels", "qcow", "qcow2", "raw", "tftp", "vdi", "vmdk", "vpc", "vvfat" - "backing_file": backing file name (json-string, optional)