From patchwork Tue Aug 31 14:32:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 63266 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 23DE0B712C for ; Wed, 1 Sep 2010 00:37:17 +1000 (EST) Received: from localhost ([127.0.0.1]:51625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqRwn-0003EU-Pc for incoming@patchwork.ozlabs.org; Tue, 31 Aug 2010 10:36:25 -0400 Received: from [140.186.70.92] (port=36757 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqRtD-0001QW-Nj for qemu-devel@nongnu.org; Tue, 31 Aug 2010 10:32:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqRt6-0002qn-Ed for qemu-devel@nongnu.org; Tue, 31 Aug 2010 10:32:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4951) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqRt6-0002qf-3V for qemu-devel@nongnu.org; Tue, 31 Aug 2010 10:32:36 -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 o7VEWZaR008490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 31 Aug 2010 10:32:35 -0400 Received: from rincewind.home.kraxel.org (vpn1-5-233.ams2.redhat.com [10.36.5.233]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7VEWUtl022984; Tue, 31 Aug 2010 10:32:34 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 76600411DB; Tue, 31 Aug 2010 16:32:29 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 31 Aug 2010 16:32:20 +0200 Message-Id: <1283265148-15977-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1283265148-15977-1-git-send-email-kraxel@redhat.com> References: <1283265148-15977-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 v5 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) {