From patchwork Fri Aug 20 11:52:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 62269 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 8A3A3B70DA for ; Fri, 20 Aug 2010 21:55:03 +1000 (EST) Received: from localhost ([127.0.0.1]:44120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmQBY-0004RF-H6 for incoming@patchwork.ozlabs.org; Fri, 20 Aug 2010 07:55:00 -0400 Received: from [140.186.70.92] (port=57274 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmQ8n-0003Dt-HU for qemu-devel@nongnu.org; Fri, 20 Aug 2010 07:52:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmQ8l-0003eS-Dg for qemu-devel@nongnu.org; Fri, 20 Aug 2010 07:52:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60657) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmQ8l-0003e6-66 for qemu-devel@nongnu.org; Fri, 20 Aug 2010 07:52:07 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7KBq67E028525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 20 Aug 2010 07:52:06 -0400 Received: from rincewind.home.kraxel.org (vpn2-11-56.ams2.redhat.com [10.36.11.56]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7KBq3Q2025418; Fri, 20 Aug 2010 07:52:04 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id D5752405E3; Fri, 20 Aug 2010 13:52:02 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 20 Aug 2010 13:52:02 +0200 Message-Id: <1282305122-29097-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1282305122-29097-1-git-send-email-kraxel@redhat.com> References: <1282305122-29097-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 3/3] compile -fsdev and -virtfs cmd line options unconditionally. 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 --- qemu-options.hx | 4 ---- vl.c | 17 +++++++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index db86feb..453f129 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -482,7 +482,6 @@ possible drivers and properties, use @code{-device ?} and @code{-device @var{driver},?}. ETEXI -#ifdef CONFIG_LINUX DEFHEADING(File system options:) DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev, @@ -515,9 +514,7 @@ Create a file-system-"device" for local-filesystem. @end table ETEXI -#endif -#ifdef CONFIG_LINUX DEFHEADING(Virtual File system pass-through options:) DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs, @@ -554,7 +551,6 @@ Create a Virtual file-system-pass through for local-filesystem. @end table ETEXI -#endif DEFHEADING() diff --git a/vl.c b/vl.c index 158aeaf..1d102e6 100644 --- a/vl.c +++ b/vl.c @@ -1811,6 +1811,7 @@ int main(int argc, char **argv, char **envp) DisplayChangeListener *dcl; int cyls, heads, secs, translation; QemuOpts *hda_opts = NULL, *opts; + QemuOptsList *olist; int optind; const char *optarg; const char *loadvm = NULL; @@ -2286,9 +2287,13 @@ int main(int argc, char **argv, char **envp) exit(1); } break; -#ifdef CONFIG_VIRTFS case QEMU_OPTION_fsdev: - opts = qemu_opts_parse(qemu_find_opts("fsdev"), optarg, 1); + olist = qemu_find_opts("fsdev"); + if (!olist) { + fprintf(stderr, "fsdev is not supported by this qemu build.\n"); + exit(1); + } + opts = qemu_opts_parse(olist, optarg, 1); if (!opts) { fprintf(stderr, "parse error: %s\n", optarg); exit(1); @@ -2299,7 +2304,12 @@ int main(int argc, char **argv, char **envp) char *arg_9p = NULL; int len = 0; - opts = qemu_opts_parse(qemu_find_opts("virtfs"), optarg, 1); + olist = qemu_find_opts("virtfs"); + if (!olist) { + fprintf(stderr, "virtfs is not supported by this qemu build.\n"); + exit(1); + } + opts = qemu_opts_parse(olist, optarg, 1); if (!opts) { fprintf(stderr, "parse error: %s\n", optarg); exit(1); @@ -2362,7 +2372,6 @@ int main(int argc, char **argv, char **envp) qemu_free(arg_9p); break; } -#endif case QEMU_OPTION_serial: add_device_config(DEV_SERIAL, optarg); default_serial = 0;