[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/5] xl: Pass -v options on to migration receiver
Compute a -v option to pass to the migration receiver. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> --- tools/libxl/xl.c | 2 +- tools/libxl/xl.h | 2 ++ tools/libxl/xl_cmdimpl.c | 14 +++++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index 7fdc155..22bbcc6 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -50,7 +50,7 @@ enum output_format default_output_format = OUTPUT_FORMAT_JSON; int claim_mode = 1; bool progress_use_cr = 0; -static xentoollog_level minmsglevel = XTL_PROGRESS; +xentoollog_level minmsglevel = XTL_PROGRESS; /* Get autoballoon option based on presence of dom0_mem Xen command line option. */ diff --git a/tools/libxl/xl.h b/tools/libxl/xl.h index 1a71234..280d39c 100644 --- a/tools/libxl/xl.h +++ b/tools/libxl/xl.h @@ -153,6 +153,8 @@ extern int run_hotplug_scripts; extern int dryrun_only; extern int claim_mode; extern bool progress_use_cr; +extern xentoollog_level minmsglevel; +#define minmsglevel_default XTL_PROGRESS extern char *lockfile; extern char *default_vifscript; extern char *default_bridge; diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index d52b933..8990020 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -4115,9 +4115,21 @@ int main_migrate(int argc, char **argv) if (!ssh_command[0]) { rune= host; } else { - if (asprintf(&rune, "exec %s %s xl%s migrate-receive%s%s", + char verbose_buf[minmsglevel_default+3]; + int verbose_len; + verbose_buf[0] = ' '; + verbose_buf[1] = '-'; + memset(verbose_buf+2, 'v', minmsglevel_default); + verbose_buf[sizeof(verbose_buf)-1] = 0; + if (minmsglevel == minmsglevel_default) { + verbose_len = 0; + } else { + verbose_len = (minmsglevel_default - minmsglevel) + 2; + } + if (asprintf(&rune, "exec %s %s xl%s%.*s migrate-receive%s%s", ssh_command, host, pass_tty_arg ? " -t" : "", + verbose_len, verbose_buf, daemonize ? "" : " -e", debug ? " -d" : "") < 0) return 1; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |