diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-09-18 15:11:39 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-09-18 15:11:39 +0100 |
commit | 2af556c077ab270134bb6ab54456165ff6eab015 (patch) | |
tree | 5d713e006db07e629d3fe65ac1e4810923475aae /tools | |
parent | d308f9ebc60721f67c1d536735dcdefba9df2b69 (diff) | |
download | xen-2af556c077ab270134bb6ab54456165ff6eab015.tar.gz xen-2af556c077ab270134bb6ab54456165ff6eab015.tar.bz2 xen-2af556c077ab270134bb6ab54456165ff6eab015.zip |
Log an error when enabling shadow mode fails for live relocation.
Signed-off-by: Doug Merrill <dpmerrill@novell.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxc/xc_domain_save.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c index abd3cedf32..ebd77d6856 100644 --- a/tools/libxc/xc_domain_save.c +++ b/tools/libxc/xc_domain_save.c @@ -789,7 +789,7 @@ int xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, { xc_dominfo_t info; - int rc = 1, i, j, last_iter, iter = 0; + int rc = 1, frc, i, j, last_iter, iter = 0; int live = (flags & XCFLAGS_LIVE); int debug = (flags & XCFLAGS_DEBUG); int race = 0, sent_last_iter, skip_this_iter; @@ -882,13 +882,18 @@ int xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, { /* log-dirty already enabled? There's no test op, so attempt to disable then reenable it */ - if ( !(xc_shadow_control(xc_handle, dom, XEN_DOMCTL_SHADOW_OP_OFF, - NULL, 0, NULL, 0, NULL) >= 0 && - xc_shadow_control(xc_handle, dom, - XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY, - NULL, 0, NULL, 0, NULL) >= 0) ) + frc = xc_shadow_control(xc_handle, dom, XEN_DOMCTL_SHADOW_OP_OFF, + NULL, 0, NULL, 0, NULL); + if ( frc >= 0 ) { - ERROR("Couldn't enable shadow mode"); + frc = xc_shadow_control(xc_handle, dom, + XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY, + NULL, 0, NULL, 0, NULL); + } + + if ( frc < 0 ) + { + ERROR("Couldn't enable shadow mode (rc %d) (errno %d)", frc, errno ); goto out; } } |