aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Jackson <Ian.Jackson@eu.citrix.com>2011-02-25 18:43:48 +0000
committerIan Jackson <Ian.Jackson@eu.citrix.com>2011-02-25 18:43:48 +0000
commit80ce9f75e5223dbfc95fcddb7139fc474043ca8e (patch)
treea1f31951425c54441d8bcef8dbf0537cca536fbd
parent832085e21c1c24a5cf3aa5607f0c147f66f89585 (diff)
downloadxen-80ce9f75e5223dbfc95fcddb7139fc474043ca8e.tar.gz
xen-80ce9f75e5223dbfc95fcddb7139fc474043ca8e.tar.bz2
xen-80ce9f75e5223dbfc95fcddb7139fc474043ca8e.zip
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@eu.citrix.com> Reported-by: W. Michael Petullo <mike@flyn.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--tools/libxl/xl_cmdimpl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index fe136eeab6..2dd0f29e71 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3253,6 +3253,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)