WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] tools/xenpaging: fix return value from xc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools/xenpaging: fix return value from xc_mem_paging_flush_ioemu_cache
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2011 07:59:44 -0800
Delivery-date: Mon, 17 Jan 2011 08:14:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1294764489 0
# Node ID ae3567ccf5240f31f77fed80ba6e174085f49bff
# Parent  6852e3e7ef58bd1db90af1edeb42c6cf24318fc8
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@xxxxxxxxxxx>
Author: Olaf Hering <olaf@xxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/xenpaging/xc.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 6852e3e7ef58 -r ae3567ccf524 tools/xenpaging/xc.c
--- a/tools/xenpaging/xc.c      Tue Jan 11 16:42:41 2011 +0000
+++ b/tools/xenpaging/xc.c      Tue Jan 11 16:48:09 2011 +0000
@@ -62,7 +62,7 @@ int xc_mem_paging_flush_ioemu_cache(domi
 
     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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools/xenpaging: fix return value from xc_mem_paging_flush_ioemu_cache, Xen patchbot-unstable <=