xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH 09/11] xl: implement -N (dry run) global option for create and cpupool-create
Date: Fri, 3 Jun 2011 15:54:25 +0100	[thread overview]
Message-ID: <1307112867-15977-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1307112867-15977-2-git-send-email-ian.jackson@eu.citrix.com>

These subcommands already had "-n" dry run options.  Make -N do the
same thing, and deprecate those -n options.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 tools/libxl/xl_cmdimpl.c  |   11 +++++------
 tools/libxl/xl_cmdtable.c |   10 ++++++----
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 208e745..5c63686 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3034,7 +3034,7 @@ int main_create(int argc, char **argv)
     char extra_config[1024];
     struct domain_create dom_info;
     int paused = 0, debug = 0, daemonize = 1, console_autoconnect = 0,
-        dryrun = 0, quiet = 0, monitor = 1;
+        quiet = 0, monitor = 1;
     int opt, rc;
     int option_index = 0;
     static struct option long_options[] = {
@@ -3079,7 +3079,7 @@ int main_create(int argc, char **argv)
             help("create");
             return 0;
         case 'n':
-            dryrun = 1;
+            dryrun_only = 1;
             break;
         case 'q':
             quiet = 1;
@@ -3108,7 +3108,7 @@ int main_create(int argc, char **argv)
     dom_info.daemonize = daemonize;
     dom_info.monitor = monitor;
     dom_info.paused = paused;
-    dom_info.dryrun = dryrun;
+    dom_info.dryrun = dryrun_only;
     dom_info.quiet = quiet;
     dom_info.config_file = filename;
     dom_info.extra_config = extra_config;
@@ -4564,7 +4564,6 @@ int main_cpupoolcreate(int argc, char **argv)
     const char *filename = NULL;
     const char *p;
     char extra_config[1024];
-    int dryrun = 0;
     int opt;
     int option_index = 0;
     static struct option long_options[] = {
@@ -4603,7 +4602,7 @@ int main_cpupoolcreate(int argc, char **argv)
             help("cpupool-create");
             return 0;
         case 'n':
-            dryrun = 1;
+            dryrun_only = 1;
             break;
         default:
             fprintf(stderr, "option `%c' not supported.\n", optopt);
@@ -4755,7 +4754,7 @@ int main_cpupoolcreate(int argc, char **argv)
     printf("scheduler:      %s\n", sched);
     printf("number of cpus: %d\n", n_cpus);
 
-    if (dryrun)
+    if (dryrun_only)
         return 0;
 
     poolid = 0;
diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c
index 5308288..924920b 100644
--- a/tools/libxl/xl_cmdtable.c
+++ b/tools/libxl/xl_cmdtable.c
@@ -19,7 +19,7 @@
 
 struct cmd_spec cmd_table[] = {
     { "create",
-      &main_create, 0,
+      &main_create, 1,
       "Create a domain from config file <filename>",
       "<ConfigFile> [options] [vars]",
       "-h                      Print this help.\n"
@@ -27,7 +27,8 @@ struct cmd_spec cmd_table[] = {
       "-c                      Connect to the console after the domain is created.\n"
       "-f=FILE, --defconfig=FILE\n                     Use the given configuration file.\n"
       "-q, --quiet             Quiet.\n"
-      "-n, --dryrun            Dry run - prints the resulting configuration.\n"
+      "-n, --dryrun            Dry run - prints the resulting configuration\n"
+      "                         (deprecated in favour of global -N option).\n"
       "-d                      Enable debug messages.\n"
       "-e                      Do not wait in the background for the death of the domain."
     },
@@ -322,12 +323,13 @@ struct cmd_spec cmd_table[] = {
       "",
     },
     { "cpupool-create",
-      &main_cpupoolcreate, 0,
+      &main_cpupoolcreate, 1,
       "Create a CPU pool based an ConfigFile",
       "[options] <ConfigFile> [vars]",
       "-h, --help                   Print this help.\n"
       "-f=FILE, --defconfig=FILE    Use the given configuration file.\n"
-      "-n, --dryrun                 Dry run - prints the resulting configuration."
+      "-n, --dryrun                 Dry run - prints the resulting configuration.\n"
+      "                              (deprecated in favour of global -N option)."
     },
     { "cpupool-list",
       &main_cpupoollist, 0,
-- 
1.5.6.5

  reply	other threads:[~2011-06-03 14:54 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 17:55 [PATCH 0/9] libxl: disk configuration handling Ian Jackson
2011-06-02 17:55 ` [PATCH 1/9] libxl: disks: Make LIBXL_DISK_BACKEND_UNKNOWN work Ian Jackson
2011-06-02 17:55   ` [PATCH 2/9] libxl: disks: new xlu_disk_parse function Ian Jackson
2011-06-02 17:55     ` [PATCH 3/9] libxl: disks: commit libxlu_disk_l.[ch] flex output Ian Jackson
2011-06-02 17:55       ` [PATCH 4/9] docs: update xl-disk-configuration.txt to describe new syntax Ian Jackson
2011-06-02 17:55         ` [PATCH 5/9] xl: disks: replace config file disk spec parser with call to xlu_disk_parse Ian Jackson
2011-06-02 17:55           ` [PATCH 6/9] xl: disks: replace block-attach disk config parser with call to xlu_parse_disk Ian Jackson
2011-06-02 17:55             ` [PATCH 7/9] libxl: disks: allow specification of "backendtype=phy|tap|qdisk" Ian Jackson
2011-06-02 17:55               ` [PATCH 8/9] xl: xl block-attach -N (dry run) option Ian Jackson
2011-06-02 17:55                 ` [PATCH 9/9] xl: new "check-xl-disk-parse" test script for disk parser Ian Jackson
2011-06-03 10:38                   ` Ian Campbell
2011-06-03 11:12                     ` Ian Jackson
2011-06-03 14:25                     ` Ian Jackson
2011-06-03 14:32                       ` Ian Campbell
2011-06-03 10:30                 ` [PATCH 8/9] xl: xl block-attach -N (dry run) option Ian Campbell
2011-06-03 11:17                   ` Ian Jackson
2011-06-03 14:54                   ` [PATCHES 00/08-11] xl dry run option, and disk parser test script Ian Jackson
2011-06-03 14:54                     ` [PATCH 08/11] xl: new global -N option for dry run Ian Jackson
2011-06-03 14:54                       ` Ian Jackson [this message]
2011-06-03 14:54                         ` [PATCH 10/11] xl: xl block-attach -N (dry run) option Ian Jackson
2011-06-03 14:54                           ` [PATCH 11/11] xl: new "check-xl-disk-parse" test script for disk parser Ian Jackson
2011-06-03 15:09                             ` Ian Campbell
2011-06-03 15:05                           ` [PATCH 10/11] xl: xl block-attach -N (dry run) option Ian Campbell
2011-06-23 16:36                           ` Ian Campbell
2011-06-03 15:04                         ` [PATCH 09/11] xl: implement -N (dry run) global option for create and cpupool-create Ian Campbell
2011-06-03 15:04                       ` [PATCH 08/11] xl: new global -N option for dry run Ian Campbell
2011-06-03 10:38                 ` [PATCH 8/9] xl: xl block-attach -N (dry run) option Ian Campbell
2011-06-03 11:13                   ` Ian Jackson
2011-06-03 12:09                     ` Ian Campbell
2011-06-03 10:46                 ` Ian Campbell
2011-06-03 11:16                   ` Ian Jackson
2011-06-03 13:00                     ` Ian Campbell
2011-06-03 10:27               ` [PATCH 7/9] libxl: disks: allow specification of "backendtype=phy|tap|qdisk" Ian Campbell
2011-06-03 14:24                 ` Ian Jackson
2011-06-03 14:32                   ` Ian Campbell
2011-06-03 10:21             ` [PATCH 6/9] xl: disks: replace block-attach disk config parser with call to xlu_parse_disk Ian Campbell
2011-06-03 10:20           ` [PATCH 5/9] xl: disks: replace config file disk spec parser with call to xlu_disk_parse Ian Campbell
2011-06-03 10:19         ` [PATCH 4/9] docs: update xl-disk-configuration.txt to describe new syntax Ian Campbell
2011-06-03 10:19       ` [PATCH 3/9] libxl: disks: commit libxlu_disk_l.[ch] flex output Ian Campbell
2011-06-03 10:08     ` [PATCH 2/9] libxl: disks: new xlu_disk_parse function Ian Campbell
2011-06-03 11:10       ` Ian Jackson
2011-06-03 12:03         ` Ian Campbell
2011-06-03 14:06           ` Ian Campbell
2011-06-21 17:27             ` Ian Jackson
2011-06-22  8:19               ` Ian Campbell
2011-06-22 13:16                 ` Ian Campbell
2011-06-03 10:18     ` Ian Campbell
2011-06-03  8:42   ` [PATCH 1/9] libxl: disks: Make LIBXL_DISK_BACKEND_UNKNOWN work Ian Campbell
2011-06-03 14:24     ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307112867-15977-3-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).