ia64/xen-unstable

changeset 4068:78dff7880271

bitkeeper revision 1.1236.23.1 (42305c30ANG71NeXhipzTkvkmsry9Q)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-unstable.bk
author iap10@freefall.cl.cam.ac.uk
date Thu Mar 10 14:39:44 2005 +0000 (2005-03-10)
parents 254b6cc19f34 2451944220aa
children cae72af328e5
files tools/libxc/xc_linux_restore.c tools/libxutil/file_stream.c tools/xfrd/xfrd.c
line diff
     1.1 --- a/tools/libxc/xc_linux_restore.c	Thu Mar 10 02:20:43 2005 +0000
     1.2 +++ b/tools/libxc/xc_linux_restore.c	Thu Mar 10 14:39:44 2005 +0000
     1.3 @@ -99,7 +99,7 @@ int xc_linux_restore(int xc_handle, XcIO
     1.4      /* A temporary mapping of the guest's suspend record. */
     1.5      suspend_record_t *p_srec;
     1.6  
     1.7 -    char *region_base;
     1.8 +    char *region_base, *p_gdt;
     1.9  
    1.10      mmu_t *mmu = NULL;
    1.11  
    1.12 @@ -542,6 +542,13 @@ int xc_linux_restore(int xc_handle, XcIO
    1.13          ctxt.gdt_frames[i] = pfn_to_mfn_table[pfn];
    1.14      }
    1.15  
    1.16 +    /* Zero hypervisor GDT entries (supresses ugly warning) */
    1.17 +    p_gdt = xc_map_foreign_range(
    1.18 +        xc_handle, dom, PAGE_SIZE, PROT_WRITE, ctxt.gdt_frames[0]);
    1.19 +    memset( p_gdt + FIRST_RESERVED_GDT_ENTRY*8, 0,
    1.20 +               NR_RESERVED_GDT_ENTRIES*8 );
    1.21 +    munmap( p_gdt, PAGE_SIZE );
    1.22 +
    1.23      /* Uncanonicalise the page table base pointer. */
    1.24      pfn = ctxt.pt_base >> PAGE_SHIFT;
    1.25      if ( (pfn >= nr_pfns) || ((pfn_type[pfn]&LTABTYPE_MASK) != L2TAB) )
     2.1 --- a/tools/libxutil/file_stream.c	Thu Mar 10 02:20:43 2005 +0000
     2.2 +++ b/tools/libxutil/file_stream.c	Thu Mar 10 14:39:44 2005 +0000
     2.3 @@ -69,18 +69,28 @@ IOStream *iostdout = &_iostdout;
     2.4  /** IOStream for stderr. */
     2.5  IOStream *iostderr = &_iostderr;
     2.6  
     2.7 -/** Get the underlying FILE*.
     2.8 - * 
     2.9 +/* Get the underlying FILE*.
    2.10 + *
    2.11   * @param s file stream
    2.12   * @return the stream s wraps
    2.13   */
    2.14  static inline FILE *get_file(IOStream *s){
    2.15 -    switch((long)s->data){
    2.16 -    case 1: s->data = stdin; break;
    2.17 -    case 2: s->data = stdout; break;
    2.18 -    case 3: s->data = stderr; break;
    2.19 -    }
    2.20 -    return (FILE*)s->data;
    2.21 +     FILE *data = NULL;
    2.22 +     switch((long)s->data){
    2.23 +     case 1:
    2.24 +         data = stdin;
    2.25 +         break;
    2.26 +     case 2:
    2.27 +         data = stdout;
    2.28 +         break;
    2.29 +     case 3:
    2.30 +         data = stderr;
    2.31 +         break;
    2.32 +     default:
    2.33 +         data = (FILE*)s->data;
    2.34 +         break;
    2.35 +     }
    2.36 +     return data;
    2.37  }
    2.38  
    2.39  /** Control buffering on the underlying stream, like setvbuf().
     3.1 --- a/tools/xfrd/xfrd.c	Thu Mar 10 02:20:43 2005 +0000
     3.2 +++ b/tools/xfrd/xfrd.c	Thu Mar 10 14:39:44 2005 +0000
     3.3 @@ -1007,6 +1007,8 @@ int xfrd_accept(Args *args, int sock){
     3.4      }
     3.5      iprintf("> Accepted connection from %s:%d on %d\n",
     3.6              inet_ntoa(peer_in.sin_addr), htons(peer_in.sin_port), sock);
     3.7 +    fflush(stdout);
     3.8 +    fflush(stderr);
     3.9      pid = fork();
    3.10      if(pid > 0){
    3.11          // Parent, fork succeeded.