[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.2-testing] xc_save/xc_restore: Fix wrong data type



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224177263 -3600
# Node ID 88fee130562746836819cf4e6088e5f4ba8b0c31
# Parent  da7ba13a646338713aee5d23c043f73bad9d420a
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>
xen-unstable changeset:   18510:694b7daa353c
xen-unstable date:        Wed Sep 17 14:16:02 2008 +0100
---
 tools/xcutils/xc_restore.c |    4 ++--
 tools/xcutils/xc_save.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -r da7ba13a6463 -r 88fee1305627 tools/xcutils/xc_restore.c
--- a/tools/xcutils/xc_restore.c        Thu Oct 16 18:12:57 2008 +0100
+++ b/tools/xcutils/xc_restore.c        Thu Oct 16 18:14:23 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 da7ba13a6463 -r 88fee1305627 tools/xcutils/xc_save.c
--- a/tools/xcutils/xc_save.c   Thu Oct 16 18:12:57 2008 +0100
+++ b/tools/xcutils/xc_save.c   Thu Oct 16 18:14:23 2008 +0100
@@ -171,8 +171,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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.