direct-io.hg

changeset 13568:bea505a69722

[LIBXC] Provide weak stub default implementations of xc_hvm_save() and
xc_hvm_restore() for architectures with no full implementation.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Jan 23 15:58:05 2007 +0000 (2007-01-23)
parents 373b09ddc905
children 73b88d158ec9
files tools/libxc/xg_private.c
line diff
     1.1 --- a/tools/libxc/xg_private.c	Tue Jan 23 15:54:12 2007 +0000
     1.2 +++ b/tools/libxc/xg_private.c	Tue Jan 23 15:58:05 2007 +0000
     1.3 @@ -188,11 +188,32 @@ unsigned long csum_page(void *page)
     1.4      return sum ^ (sum>>32);
     1.5  }
     1.6  
     1.7 -__attribute__((weak)) int xc_hvm_build(
     1.8 -    int xc_handle,
     1.9 -    uint32_t domid,
    1.10 -    int memsize,
    1.11 -    const char *image_name)
    1.12 +__attribute__((weak)) 
    1.13 +int xc_hvm_build(int xc_handle,
    1.14 +                 uint32_t domid,
    1.15 +                 int memsize,
    1.16 +                 const char *image_name)
    1.17 +{
    1.18 +    errno = ENOSYS;
    1.19 +    return -1;
    1.20 +}
    1.21 +
    1.22 +__attribute__((weak)) 
    1.23 +int xc_hvm_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
    1.24 +                uint32_t max_factor, uint32_t flags,
    1.25 +                int (*suspend)(int domid))
    1.26  {
    1.27 -    return -ENOSYS;
    1.28 +    errno = ENOSYS;
    1.29 +    return -1;
    1.30  }
    1.31 +
    1.32 +__attribute__((weak)) 
    1.33 +int xc_hvm_restore(int xc_handle, int io_fd, uint32_t dom,
    1.34 +                   unsigned long nr_pfns, unsigned int store_evtchn,
    1.35 +                   unsigned long *store_mfn, unsigned int console_evtchn,
    1.36 +                   unsigned long *console_mfn,
    1.37 +                   unsigned int pae, unsigned int apic)
    1.38 +{
    1.39 +    errno = ENOSYS;
    1.40 +    return -1;
    1.41 +}