aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/xl.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-04-26 06:52:44 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-04-26 06:52:44 +0100
commit6b19626a0ed860773df316e8cacf15017fd9c470 (patch)
tree36a0df27e965950b91223a0f418642c51be125bb /tools/libxl/xl.c
parentbd8daf603563440f95604e5c1b53a30335e3081e (diff)
downloadxen-6b19626a0ed860773df316e8cacf15017fd9c470.tar.gz
xen-6b19626a0ed860773df316e8cacf15017fd9c470.tar.bz2
xen-6b19626a0ed860773df316e8cacf15017fd9c470.zip
xl: Add option '-p' for command 'xl create'
Add option '-p' for command 'xl create', and update the help info. * -p Leave the domain paused after it is created. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Diffstat (limited to 'tools/libxl/xl.c')
-rw-r--r--tools/libxl/xl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
index 6ea4fd76ab..1bf991cc30 100644
--- a/tools/libxl/xl.c
+++ b/tools/libxl/xl.c
@@ -1112,6 +1112,7 @@ static void help(char *command)
printf("Create a domain based on <ConfigFile>.\n\n");
printf("Options:\n\n");
printf("-h Print this help.\n");
+ printf("-p Leave the domain paused after it is created.\n");
printf("-d Enable debug messages.\n");
printf("-e Do not wait in the background for the death of the domain.\n");
} else if(!strcmp(command, "list")) {
@@ -2290,11 +2291,14 @@ int main_list_vm(int argc, char **argv)
int main_create(int argc, char **argv)
{
char *filename = NULL;
- int debug = 0, daemonize = 1;
+ int paused = 0, debug = 0, daemonize = 1;
int opt, rc;
- while ((opt = getopt(argc, argv, "hde")) != -1) {
+ while ((opt = getopt(argc, argv, "hdep")) != -1) {
switch (opt) {
+ case 'p':
+ paused = 1;
+ break;
case 'd':
debug = 1;
break;
@@ -2316,7 +2320,7 @@ int main_create(int argc, char **argv)
}
filename = argv[optind];
- rc = create_domain(debug, daemonize, filename, NULL, 0,
+ rc = create_domain(debug, daemonize, filename, NULL, paused,
-1, 0);
exit(-rc);
}