Received: from eggs.gnu.org ([2001:4830:134:3::10]:37166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdIJV-0002Uf-5V for qemu-devel@nongnu.org; Mon, 04 Nov 2013 06:27:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdIJP-000322-6G for qemu-devel@nongnu.org; Mon, 04 Nov 2013 06:27:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdIJO-00031x-Ur for qemu-devel@nongnu.org; Mon, 04 Nov 2013 06:27:15 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA4BRDQf009203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Nov 2013 06:27:14 -0500 Date: Mon, 4 Nov 2013 12:27:10 +0100 From: Kevin Wolf Message-ID: <20131104112710.GF4199@dhcp-200-207.str.redhat.com> References: <1383548496-21894-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1383548496-21894-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH RFC] blockdev: copy legacy and common opts to qemu_drive_opts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: libvir-list@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, jyang@redhat.com Am 04.11.2013 um 08:01 hat Amos Kong geschrieben: > Currently we have three QemuOptsList (qemu_common_drive_opts, > qemu_legacy_drive_opts, and qemu_drive_opts), only qemu_drive_opts > is added to vm_config_groups[]. > > We query commandline options by checking information in > vm_config_groups[], so we can only get a NULL parameter list now. > > This patch copied desc items of qemu_legacy_drive_opts and > qemu_common_drive_opts to qemu_drive_opts. > > Signed-off-by: Amos Kong This breaks driver-specific options because they aren't (and cannot be) listed in the QemuOptsList. For example: $ x86_64-softmmu/qemu-system-x86_64 -drive file.driver=nbd,file.host=localhost qemu-system-x86_64: -drive file.driver=nbd,file.host=localhost: Invalid parameter 'file.driver' query-command-line-options isn't an appropriate API to query the -drive capabilities in the blockdev-add world. You really want to have introspection for that. For compatibility, we might want to at least expose part of the provided options there. In this case you should modify the monitor command to access the local QemuOptsLists of drive_init() and blockdev_init() for option="drive". Kevin