aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/xl.c
diff options
context:
space:
mode:
authorStefan Bader <stefan.bader@canonical.com>2012-02-13 17:45:13 +0000
committerStefan Bader <stefan.bader@canonical.com>2012-02-13 17:45:13 +0000
commit31c1a7e0ccd811466de1b8ce42864eb41d4b3d21 (patch)
tree6200540a176e51c474c7d3e96ebebbac96f9f9da /tools/libxl/xl.c
parent321e74e4bc96b34c687b17d5dcb2734f2651eabb (diff)
downloadxen-31c1a7e0ccd811466de1b8ce42864eb41d4b3d21.tar.gz
xen-31c1a7e0ccd811466de1b8ce42864eb41d4b3d21.tar.bz2
xen-31c1a7e0ccd811466de1b8ce42864eb41d4b3d21.zip
xl: Add defaultbridge config option for xl.conf
Currently guests created with the xl stack will have "xenbr0" written as their default into xenstore. It can be changed in the individual guest config files, but there is no way to have that default globally changed. Add a config option to xl.conf that allows to have a different default bridge name. Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/xl.c')
-rw-r--r--tools/libxl/xl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
index 9dac99842e..df9b1e7528 100644
--- a/tools/libxl/xl.c
+++ b/tools/libxl/xl.c
@@ -38,6 +38,7 @@ int dryrun_only;
int autoballoon = 1;
char *lockfile;
char *default_vifscript = NULL;
+char *default_bridge = NULL;
enum output_format default_output_format = OUTPUT_FORMAT_JSON;
static xentoollog_level minmsglevel = XTL_PROGRESS;
@@ -79,6 +80,9 @@ static void parse_global_config(const char *configfile,
if (!xlu_cfg_get_string (config, "vifscript", &buf, 0))
default_vifscript = strdup(buf);
+ if (!xlu_cfg_get_string (config, "defaultbridge", &buf, 0))
+ default_bridge = strdup(buf);
+
if (!xlu_cfg_get_string (config, "output_format", &buf, 0)) {
if (!strcmp(buf, "json"))
default_output_format = OUTPUT_FORMAT_JSON;