direct-io.hg

changeset 1747:2f1d50d10f6f

bitkeeper revision 1.1062.3.4 (40f2b160cK4vITpgYulcbL0jKHqM4A)

Debug prints and small fix to ioctxt struct.
author mjw@wray-m-3.hpl.hp.com
date Mon Jul 12 15:42:24 2004 +0000 (2004-07-12)
parents 3000423a41b1
children d16b3390235a 095e969226c4
files tools/xfrd/xen_domain.c tools/xfrd/xfrd.c
line diff
     1.1 --- a/tools/xfrd/xen_domain.c	Mon Jul 12 15:08:24 2004 +0000
     1.2 +++ b/tools/xfrd/xen_domain.c	Mon Jul 12 15:42:24 2004 +0000
     1.3 @@ -18,9 +18,13 @@
     1.4  
     1.5  #ifndef _XEN_XFR_STUB_
     1.6  static int domain_suspend(u32 dom, void *data){
     1.7 +    int err = 0;
     1.8      Conn *xend = data;
     1.9  
    1.10 -    return xfr_vm_suspend(xend, dom);
    1.11 +    dprintf("> dom=%lu data=%p\n", dom, data);
    1.12 +    err = xfr_vm_suspend(xend, dom);
    1.13 +    dprintf("< err=%d\n", err);
    1.14 +    return err;
    1.15  }
    1.16  
    1.17  static int xc_handle = 0;
    1.18 @@ -29,6 +33,7 @@ int xcinit(void){
    1.19      if(xc_handle <= 0){
    1.20          xc_handle = xc_interface_open();
    1.21      }
    1.22 +    dprintf("< xc_handle=%d\n", xc_handle);
    1.23      return xc_handle;
    1.24  }
    1.25  
    1.26 @@ -72,6 +77,7 @@ int xen_domain_snd(Conn *xend, IOStream 
    1.27  #else 
    1.28      XcIOContext _ioctxt = {}, *ioctxt = &_ioctxt;
    1.29      dprintf("> dom=%d\n", dom);
    1.30 +    ioctxt->domain = dom;
    1.31      ioctxt->io = io;
    1.32      ioctxt->info = iostdout;
    1.33      ioctxt->err = iostderr;
     2.1 --- a/tools/xfrd/xfrd.c	Mon Jul 12 15:08:24 2004 +0000
     2.2 +++ b/tools/xfrd/xfrd.c	Mon Jul 12 15:42:24 2004 +0000
     2.3 @@ -711,8 +711,10 @@ int xfr_save(Args *args, XfrState *state
     2.4      int err = 0;
     2.5      IOStream *io = NULL;
     2.6  
     2.7 +    dprintf("> file=%s\n", file);
     2.8      io = file_stream_fopen(file, "wb");
     2.9      if(!io){
    2.10 +        dprintf("> Failed to open %s\n", file);
    2.11          err = -EIO;
    2.12          goto exit;
    2.13      }
    2.14 @@ -727,6 +729,7 @@ int xfr_save(Args *args, XfrState *state
    2.15          IOStream_close(io);
    2.16          IOStream_free(io);
    2.17      }
    2.18 +    dprintf("< err=%d\n", err);
    2.19      return err;
    2.20  }
    2.21