ia64/xen-unstable

changeset 18513:694b7daa353c

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@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Sep 17 14:16:02 2008 +0100 (2008-09-17)
parents 366c78ff361b
children 71d3d3ac23b8
files tools/xcutils/xc_restore.c tools/xcutils/xc_save.c
line diff
     1.1 --- a/tools/xcutils/xc_restore.c	Wed Sep 17 14:13:10 2008 +0100
     1.2 +++ b/tools/xcutils/xc_restore.c	Wed Sep 17 14:16:02 2008 +0100
     1.3 @@ -18,9 +18,9 @@
     1.4  int
     1.5  main(int argc, char **argv)
     1.6  {
     1.7 -    unsigned int xc_fd, io_fd, domid, store_evtchn, console_evtchn;
     1.8 +    unsigned int domid, store_evtchn, console_evtchn;
     1.9      unsigned int hvm, pae, apic;
    1.10 -    int ret;
    1.11 +    int xc_fd, io_fd, ret;
    1.12      unsigned long store_mfn, console_mfn;
    1.13  
    1.14      if ( argc != 8 )
     2.1 --- a/tools/xcutils/xc_save.c	Wed Sep 17 14:13:10 2008 +0100
     2.2 +++ b/tools/xcutils/xc_save.c	Wed Sep 17 14:16:02 2008 +0100
     2.3 @@ -297,8 +297,8 @@ static void *init_qemu_maps(int domid, u
     2.4  int
     2.5  main(int argc, char **argv)
     2.6  {
     2.7 -    unsigned int xc_fd, io_fd, domid, maxit, max_f, flags; 
     2.8 -    int ret;
     2.9 +    unsigned int domid, maxit, max_f, flags; 
    2.10 +    int xc_fd, io_fd, ret;
    2.11  
    2.12      if (argc != 6)
    2.13          errx(1, "usage: %s iofd domid maxit maxf flags", argv[0]);