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] xc_save/xc_restore: Fix wrong data type

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xc_save/xc_restore: Fix wrong data type
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Sep 2008 18:00:09 -0700
Delivery-date: Wed, 17 Sep 2008 17:59:57 -0700
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1221657362 -3600
# Node ID 694b7daa353c629e43672195c96a9334b62d69af
# Parent  366c78ff361bafb2271c551c4976e4caedea72b2
xc_save/xc_restore: Fix wrong data type

xc_interface_open() may return -1, but if we define xc_fd as unsigned
int, then -1 will be > 0.

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/xcutils/xc_restore.c |    4 ++--
 tools/xcutils/xc_save.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -r 366c78ff361b -r 694b7daa353c tools/xcutils/xc_restore.c
--- a/tools/xcutils/xc_restore.c        Wed Sep 17 14:13:10 2008 +0100
+++ b/tools/xcutils/xc_restore.c        Wed Sep 17 14:16:02 2008 +0100
@@ -18,9 +18,9 @@ int
 int
 main(int argc, char **argv)
 {
-    unsigned int xc_fd, io_fd, domid, store_evtchn, console_evtchn;
+    unsigned int domid, store_evtchn, console_evtchn;
     unsigned int hvm, pae, apic;
-    int ret;
+    int xc_fd, io_fd, ret;
     unsigned long store_mfn, console_mfn;
 
     if ( argc != 8 )
diff -r 366c78ff361b -r 694b7daa353c tools/xcutils/xc_save.c
--- a/tools/xcutils/xc_save.c   Wed Sep 17 14:13:10 2008 +0100
+++ b/tools/xcutils/xc_save.c   Wed Sep 17 14:16:02 2008 +0100
@@ -297,8 +297,8 @@ int
 int
 main(int argc, char **argv)
 {
-    unsigned int xc_fd, io_fd, domid, maxit, max_f, flags; 
-    int ret;
+    unsigned int domid, maxit, max_f, flags; 
+    int xc_fd, io_fd, ret;
 
     if (argc != 6)
         errx(1, "usage: %s iofd domid maxit maxf flags", argv[0]);

_______________________________________________
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] xc_save/xc_restore: Fix wrong data type, Xen patchbot-unstable <=