From patchwork Fri Aug 27 09:59:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 62836 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 0148CB70E6 for ; Fri, 27 Aug 2010 20:03:14 +1000 (EST) Received: from localhost ([127.0.0.1]:60617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OovmB-0007cG-Sx for incoming@patchwork.ozlabs.org; Fri, 27 Aug 2010 06:03:12 -0400 Received: from [140.186.70.92] (port=37208 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OovjI-00079k-Mw for qemu-devel@nongnu.org; Fri, 27 Aug 2010 06:00:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OovjA-0008Sn-P2 for qemu-devel@nongnu.org; Fri, 27 Aug 2010 06:00:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12047) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OovjA-0008SX-Iy for qemu-devel@nongnu.org; Fri, 27 Aug 2010 06:00:04 -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 o7RA03kJ026840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 27 Aug 2010 06:00:03 -0400 Received: from rincewind.home.kraxel.org (vpn1-5-145.ams2.redhat.com [10.36.5.145]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7RA00nD016925; Fri, 27 Aug 2010 06:00:01 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id BE22C4084D; Fri, 27 Aug 2010 11:59:59 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 27 Aug 2010 11:59:51 +0200 Message-Id: <1282903199-30669-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1282903199-30669-1-git-send-email-kraxel@redhat.com> References: <1282903199-30669-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 v4 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) {