WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[PATCH] Re: [Xen-devel] xl create ... -c

To: "W. Michael Petullo" <mike@xxxxxxxx>
Subject: [PATCH] Re: [Xen-devel] xl create ... -c
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Thu, 17 Feb 2011 18:23:56 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 17 Feb 2011 10:24:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110217011813.GA3596@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <20110217011813.GA3596@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
W. Michael Petullo writes ("[Xen-devel] xl create ... -c"):
> Has anyone else noticed that "xl create DOM -c" does not work when using
> Xen 4.1.0 RC4? This seems to contradict xl's usage message.

Thanks for the report.  I think this patch should fix it.

Ian.

xl: allow config filename to precede options

"xm create" supports options which follow the domain config filename.
So xl should do as well.

This is an ad-hoc fixup to the "xl create" command line parser.  We
should revisit the xl command line parser in 4.2.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Reported-by: W. Michael Petullo <mike@xxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 0f980d9..a2c124a 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3255,6 +3255,11 @@ int main_create(int argc, char **argv)
         {0, 0, 0, 0}
     };
 
+    if (argv[1] && argv[1][0] != '-' && !strchr(argv[1], '=')) {
+        filename = argv[1];
+        argc--; argv++;
+    }
+
     while (1) {
         opt = getopt_long(argc, argv, "hnqf:pcde", long_options, 
&option_index);
         if (opt == -1)
-- 
1.5.6.5



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>