 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] Re: [Xen-devel] xl create ... -c
 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
 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |