debuggers.hg
changeset 21279:f766f2142a85
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>
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>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Apr 26 06:52:44 2010 +0100 (2010-04-26) |
parents | 59523ceaff36 |
children | d01ea51fc929 |
files | tools/libxl/xl.c |
line diff
1.1 --- a/tools/libxl/xl.c Mon Apr 26 06:52:13 2010 +0100 1.2 +++ b/tools/libxl/xl.c Mon Apr 26 06:52:44 2010 +0100 1.3 @@ -1112,6 +1112,7 @@ static void help(char *command) 1.4 printf("Create a domain based on <ConfigFile>.\n\n"); 1.5 printf("Options:\n\n"); 1.6 printf("-h Print this help.\n"); 1.7 + printf("-p Leave the domain paused after it is created.\n"); 1.8 printf("-d Enable debug messages.\n"); 1.9 printf("-e Do not wait in the background for the death of the domain.\n"); 1.10 } else if(!strcmp(command, "list")) { 1.11 @@ -2290,11 +2291,14 @@ int main_list_vm(int argc, char **argv) 1.12 int main_create(int argc, char **argv) 1.13 { 1.14 char *filename = NULL; 1.15 - int debug = 0, daemonize = 1; 1.16 + int paused = 0, debug = 0, daemonize = 1; 1.17 int opt, rc; 1.18 1.19 - while ((opt = getopt(argc, argv, "hde")) != -1) { 1.20 + while ((opt = getopt(argc, argv, "hdep")) != -1) { 1.21 switch (opt) { 1.22 + case 'p': 1.23 + paused = 1; 1.24 + break; 1.25 case 'd': 1.26 debug = 1; 1.27 break; 1.28 @@ -2316,7 +2320,7 @@ int main_create(int argc, char **argv) 1.29 } 1.30 1.31 filename = argv[optind]; 1.32 - rc = create_domain(debug, daemonize, filename, NULL, 0, 1.33 + rc = create_domain(debug, daemonize, filename, NULL, paused, 1.34 -1, 0); 1.35 exit(-rc); 1.36 }