From: Ian Jackson Subject: [PATCH] Re: xl create ... -c Date: Thu, 17 Feb 2011 18:23:56 +0000 Message-ID: <19805.26556.514002.211294@mariner.uk.xensource.com> References: <20110217011813.GA3596@imp.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110217011813.GA3596@imp.local> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "W. Michael Petullo" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 Reported-by: W. Michael Petullo --- 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