From patchwork Tue Sep 21 16:51:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 65346 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 9D775B70AF for ; Wed, 22 Sep 2010 03:03:12 +1000 (EST) Received: from localhost ([127.0.0.1]:40362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oy6FJ-0001uj-Vn for incoming@patchwork.ozlabs.org; Tue, 21 Sep 2010 13:03:10 -0400 Received: from [140.186.70.92] (port=32772 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oy64O-0002k6-Ty for qemu-devel@nongnu.org; Tue, 21 Sep 2010 12:51:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oy64N-0000pq-Ls for qemu-devel@nongnu.org; Tue, 21 Sep 2010 12:51:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21130) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oy64N-0000pd-DK for qemu-devel@nongnu.org; Tue, 21 Sep 2010 12:51:51 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8LGpoa3023251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 21 Sep 2010 12:51:50 -0400 Received: from rincewind.home.kraxel.org (vpn1-4-82.ams2.redhat.com [10.36.4.82]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8LGpn2t015014; Tue, 21 Sep 2010 12:51:49 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 6BAB945208; Tue, 21 Sep 2010 18:51:42 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 21 Sep 2010 18:51:33 +0200 Message-Id: <1285087901-10232-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1285087901-10232-1-git-send-email-kraxel@redhat.com> References: <1285087901-10232-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH v6 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 f434193..2edc853 100644 --- a/vl.c +++ b/vl.c @@ -1863,11 +1863,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) {