From patchwork Wed Aug 25 14:19:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 62682 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3CAF1B70D4 for ; Thu, 26 Aug 2010 00:23:13 +1000 (EST) Received: from localhost ([127.0.0.1]:57995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoGsg-0007Nm-Cg for incoming@patchwork.ozlabs.org; Wed, 25 Aug 2010 10:23:10 -0400 Received: from [140.186.70.92] (port=37748 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoGpF-0005ot-Go for qemu-devel@nongnu.org; Wed, 25 Aug 2010 10:19:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OoGpC-000899-Ug for qemu-devel@nongnu.org; Wed, 25 Aug 2010 10:19:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11621) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoGpC-00088z-O3 for qemu-devel@nongnu.org; Wed, 25 Aug 2010 10:19:34 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7PEJXWq002542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Aug 2010 10:19:34 -0400 Received: from rincewind.home.kraxel.org (vpn1-5-126.ams2.redhat.com [10.36.5.126]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7PEJV27021046; Wed, 25 Aug 2010 10:19:32 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 84B1940280; Wed, 25 Aug 2010 16:19:30 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 25 Aug 2010 16:19:22 +0200 Message-Id: <1282745970-11506-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1282745970-11506-1-git-send-email-kraxel@redhat.com> References: <1282745970-11506-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH v3 02/10] Use machine_init() to register virtfs config options. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- fsdev/qemu-fsdev.c | 9 +++++++++ vl.c | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index ad69b0e..280b8f5 100644 --- a/fsdev/qemu-fsdev.c +++ b/fsdev/qemu-fsdev.c @@ -16,6 +16,7 @@ #include "qemu-queue.h" #include "osdep.h" #include "qemu-common.h" +#include "qemu-config.h" static QTAILQ_HEAD(FsTypeEntry_head, FsTypeListEntry) fstype_entries = QTAILQ_HEAD_INITIALIZER(fstype_entries); @@ -75,3 +76,11 @@ FsTypeEntry *get_fsdev_fsentry(char *id) } return NULL; } + +static void fsdev_register_config(void) +{ + qemu_add_opts(&qemu_fsdev_opts); + qemu_add_opts(&qemu_virtfs_opts); +} +machine_init(fsdev_register_config); + diff --git a/vl.c b/vl.c index d90b275..40bf30b 100644 --- a/vl.c +++ b/vl.c @@ -1856,11 +1856,6 @@ int main(int argc, char **argv, char **envp) tb_size = 0; autostart= 1; -#ifdef CONFIG_VIRTFS - qemu_add_opts(&qemu_fsdev_opts); - qemu_add_opts(&qemu_virtfs_opts); -#endif - /* first pass of option parsing */ optind = 1; while (optind < argc) {