[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xl: Pass -v options on to migration receiver
commit af0fd50fd8517673cd962e751b0216f2af44fad7 Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> AuthorDate: Tue Jan 7 18:40:05 2014 +0000 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Wed Mar 19 13:42:13 2014 +0000 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> Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx> --- v2: Use minmsglevel_default to initialise minmsglevel. --- 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..1d157fe 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 = minmsglevel_default; /* 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; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |