WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xl: implement -N (dry run) global option

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xl: implement -N (dry run) global option for create and cpupool-create
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 08 Jul 2011 06:22:18 +0100
Delivery-date: Thu, 07 Jul 2011 22:25:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
# Date 1309259956 -3600
# Node ID e5abe23f18443744389ce07603eb364f7c5a39ae
# Parent  f707974b04bacae7a6182ea67142af41efe3441d
xl: implement -N (dry run) global option for create and cpupool-create

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@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---


diff -r f707974b04ba -r e5abe23f1844 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue Jun 28 12:19:15 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue Jun 28 12:19:16 2011 +0100
@@ -3057,7 +3057,7 @@
     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[] = {
@@ -3102,7 +3102,7 @@
             help("create");
             return 0;
         case 'n':
-            dryrun = 1;
+            dryrun_only = 1;
             break;
         case 'q':
             quiet = 1;
@@ -3131,7 +3131,7 @@
     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;
@@ -4582,7 +4582,6 @@
     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[] = {
@@ -4621,7 +4620,7 @@
             help("cpupool-create");
             return 0;
         case 'n':
-            dryrun = 1;
+            dryrun_only = 1;
             break;
         default:
             fprintf(stderr, "option `%c' not supported.\n", optopt);
@@ -4773,7 +4772,7 @@
     printf("scheduler:      %s\n", sched);
     printf("number of cpus: %d\n", n_cpus);
 
-    if (dryrun)
+    if (dryrun_only)
         return 0;
 
     poolid = 0;
diff -r f707974b04ba -r e5abe23f1844 tools/libxl/xl_cmdtable.c
--- a/tools/libxl/xl_cmdtable.c Tue Jun 28 12:19:15 2011 +0100
+++ b/tools/libxl/xl_cmdtable.c Tue Jun 28 12:19:16 2011 +0100
@@ -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 @@
       "-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 @@
       "",
     },
     { "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,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xl: implement -N (dry run) global option for create and cpupool-create, Xen patchbot-unstable <=