aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xcutils
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2013-02-15 13:32:13 +0000
committerOlaf Hering <olaf@aepfle.de>2013-02-15 13:32:13 +0000
commit99bbf645d9672f2268cd78bbecdfafacc98149a0 (patch)
treee19d9fc93221beaf02d96234c9b9814f89b3a89b /tools/xcutils
parent9ddc1a73fb003b709ffefc593d8d9b43b88aac0b (diff)
downloadxen-99bbf645d9672f2268cd78bbecdfafacc98149a0.tar.gz
xen-99bbf645d9672f2268cd78bbecdfafacc98149a0.tar.bz2
xen-99bbf645d9672f2268cd78bbecdfafacc98149a0.zip
tools/xc: restore logging in xc_save
Prior to xen-4.1 the helper xc_save would print some progress during migration. With the new xc_interface_open API no more messages were printed because no logger was configured. Restore previous behaviour by providing a logger. The progress in xc_domain_save will be disabled because it generates alot of output and fills up xend.log quickly. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/xcutils')
-rw-r--r--tools/xcutils/xc_save.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/xcutils/xc_save.c b/tools/xcutils/xc_save.c
index 26e2ac1514..0131f2a257 100644
--- a/tools/xcutils/xc_save.c
+++ b/tools/xcutils/xc_save.c
@@ -166,17 +166,15 @@ static int switch_qemu_logdirty(int domid, unsigned int enable, void *data)
int
main(int argc, char **argv)
{
- unsigned int maxit, max_f;
+ unsigned int maxit, max_f, lflags;
int io_fd, ret, port;
struct save_callbacks callbacks;
+ xentoollog_level lvl;
+ xentoollog_logger *l;
if (argc != 6)
errx(1, "usage: %s iofd domid maxit maxf flags", argv[0]);
- si.xch = xc_interface_open(0,0,0);
- if (!si.xch)
- errx(1, "failed to open control interface");
-
io_fd = atoi(argv[1]);
si.domid = atoi(argv[2]);
maxit = atoi(argv[3]);
@@ -185,6 +183,13 @@ main(int argc, char **argv)
si.suspend_evtchn = -1;
+ lvl = si.flags & XCFLAGS_DEBUG ? XTL_DEBUG: XTL_DETAIL;
+ lflags = XTL_STDIOSTREAM_HIDE_PROGRESS;
+ l = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr, lvl, lflags);
+ si.xch = xc_interface_open(l, 0, 0);
+ if (!si.xch)
+ errx(1, "failed to open control interface");
+
si.xce = xc_evtchn_open(NULL, 0);
if (si.xce == NULL)
warnx("failed to open event channel handle");