* xl create ... -c
@ 2011-02-17 1:18 W. Michael Petullo
2011-02-17 18:23 ` [PATCH] " Ian Jackson
0 siblings, 1 reply; 3+ messages in thread
From: W. Michael Petullo @ 2011-02-17 1:18 UTC (permalink / raw)
To: xen-devel
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.
I see:
$ sudo xl create Client.conf -c
Usage: xl [-v] create <ConfigFile> [options] [vars]
Create a domain from config file <filename>.
Options:
-h Print this help.
-p Leave the domain paused after it is created.
-c Connect to the console after the domain is created.
So the documentation states that "-c" should accepted in this position,
but the program does not accept it.
On the other hand, "xl create -c Client.conf" works.
--
Mike
:wq
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Re: xl create ... -c
2011-02-17 1:18 xl create ... -c W. Michael Petullo
@ 2011-02-17 18:23 ` Ian Jackson
2011-02-25 18:44 ` Ian Jackson
0 siblings, 1 reply; 3+ messages in thread
From: Ian Jackson @ 2011-02-17 18:23 UTC (permalink / raw)
To: W. Michael Petullo; +Cc: xen-devel
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@eu.citrix.com>
Reported-by: W. Michael Petullo <mike@flyn.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-25 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17 1:18 xl create ... -c W. Michael Petullo
2011-02-17 18:23 ` [PATCH] " Ian Jackson
2011-02-25 18:44 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.