diff options
author | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2011-01-11 16:48:09 +0000 |
---|---|---|
committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2011-01-11 16:48:09 +0000 |
commit | 4e86bc34ad901c578d71b0fdb5e14eb591ef7811 (patch) | |
tree | 67d62427d64438c43805d10cc494c4d3caa17582 /tools | |
parent | 1676d94292f97fa86fcafa6348ac57d12c270054 (diff) | |
download | xen-4e86bc34ad901c578d71b0fdb5e14eb591ef7811.tar.gz xen-4e86bc34ad901c578d71b0fdb5e14eb591ef7811.tar.bz2 xen-4e86bc34ad901c578d71b0fdb5e14eb591ef7811.zip |
tools/xenpaging: fix return value from xc_mem_paging_flush_ioemu_cache
While using xenpaging, "Error flushing ioemu cache" message will be
shown even if the "flush-cache" command is sent to xenstore correctly.
That is because xenpaging assumes xc_mem_paging_flush_ioemu_cache()
returns non-zero value when the operation fails. But
xc_mem_paging_flush_ioemu_cache() returns the return value from
xs_write() which is zero on error.
So, we should invert the return value from xs_write() and return -1 on
error, or 0 on success, like other xc_ functions.
Signed-off-by: Han-Lin Li <Han-Lin.Li@itri.org.tw>
Author: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/xenpaging/xc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xenpaging/xc.c b/tools/xenpaging/xc.c index d1a62ff77f..d1dcb6847f 100644 --- a/tools/xenpaging/xc.c +++ b/tools/xenpaging/xc.c @@ -62,7 +62,7 @@ int xc_mem_paging_flush_ioemu_cache(domid_t domain_id) xs_daemon_close(xsh); - return rc; + return rc ? 0 : -1; } int xc_wait_for_event_or_timeout(xc_interface *xch, xc_evtchn *xce, unsigned long ms) |