ia64/xen-unstable

changeset 1886:51b2d77c6d1f

bitkeeper revision 1.1108.1.14 (4100e933KE68B3Jf7yha3GgIVt-Msw)

Stub changes.
author mjw@wray-m-3.hpl.hp.com
date Fri Jul 23 10:32:19 2004 +0000 (2004-07-23)
parents 495ae087d703
children 277bd0f6186d
files tools/libxc/xc_io.c tools/xfrd/xen_domain.c
line diff
     1.1 --- a/tools/libxc/xc_io.c	Fri Jul 23 10:08:38 2004 +0000
     1.2 +++ b/tools/libxc/xc_io.c	Fri Jul 23 10:32:19 2004 +0000
     1.3 @@ -4,7 +4,7 @@ void xcio_error(XcIOContext *ctxt, const
     1.4    va_list args;
     1.5  
     1.6    va_start(args, msg);
     1.7 -  vfprintf(stdout, msg, args); fprintf(stdout, "\n");
     1.8 +  vfprintf(stdout, msg, args); fprintf(stdout, "\n"); fflush(stdout);
     1.9    IOStream_vprint(ctxt->info, msg, args);
    1.10    IOStream_print(ctxt->info, "\n");
    1.11    va_end(args);
     2.1 --- a/tools/xfrd/xen_domain.c	Fri Jul 23 10:08:38 2004 +0000
     2.2 +++ b/tools/xfrd/xen_domain.c	Fri Jul 23 10:32:19 2004 +0000
     2.3 @@ -2,7 +2,9 @@
     2.4  #include <stdlib.h>
     2.5  #include <stdio.h>
     2.6  
     2.7 -#ifndef _XEN_XFR_STUB_
     2.8 +#ifdef _XEN_XFR_STUB_
     2.9 +typedef unsigned long u32;
    2.10 +#else
    2.11  #include "xc.h"
    2.12  #include "xc_io.h"
    2.13  #endif
    2.14 @@ -16,8 +18,8 @@
    2.15  #define DEBUG 1
    2.16  #include "debug.h"
    2.17  
    2.18 -#ifndef _XEN_XFR_STUB_
    2.19 -static int domain_suspend(u32 dom, void *data){
    2.20 +
    2.21 +int domain_suspend(u32 dom, void *data){
    2.22      int err = 0;
    2.23      Conn *xend = data;
    2.24  
    2.25 @@ -27,6 +29,7 @@ static int domain_suspend(u32 dom, void 
    2.26      return err;
    2.27  }
    2.28  
    2.29 +#ifndef _XEN_XFR_STUB_
    2.30  static int xc_handle = 0;
    2.31  
    2.32  int xcinit(void){
    2.33 @@ -61,6 +64,7 @@ int xen_domain_snd(Conn *xend, IOStream 
    2.34      err = marshal_string(io, vmconfig, vmconfig_n);
    2.35      if(err) goto exit;
    2.36      n = 32 * 1024 * 1024;
    2.37 +    n = 32 * 1024;
    2.38      buf_n = sizeof(buf);
    2.39      err = marshal_uint32(io, n);
    2.40      for(k = 0; k < n; k += d){
    2.41 @@ -72,7 +76,8 @@ int xen_domain_snd(Conn *xend, IOStream 
    2.42      }
    2.43      
    2.44      dom = 99;
    2.45 -    err = xfr_vm_suspend(xend, dom);
    2.46 +    err = domain_suspend(dom, xend);
    2.47 +    IOStream_close(io);
    2.48    exit:
    2.49  #else 
    2.50      XcIOContext _ioctxt = {}, *ioctxt = &_ioctxt;
    2.51 @@ -195,7 +200,7 @@ int xen_domain_configure(uint32_t dom, c
    2.52      // POST the form.
    2.53      curl_easy_setopt(curl, CURLOPT_HTTPPOST, form);
    2.54      dprintf("> curl perform...\n");
    2.55 -#ifdef _XEN_XFR_STUB_
    2.56 +#if 0 && defined(_XEN_XFR_STUB_)
    2.57      dprintf("> _XEN_XFR_STUB_ defined - not calling xend\n");
    2.58      curlcode = 0;
    2.59  #else