ia64/xen-unstable

changeset 10067:bc7d49df1651

Fix the tools build:
1. xenctrl.h needs to include stddef.h to define size_t
2. tbctl is broken -- remove it since xenmon and xentrace
both automatcially enable tracing now
3. Fix setsize after xc_tbug interface changes

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue May 16 13:35:59 2006 +0100 (2006-05-16)
parents df1521633fb5
children c20e766a1f72
files tools/libxc/xenctrl.h tools/xentrace/Makefile tools/xentrace/setsize.c
line diff
     1.1 --- a/tools/libxc/xenctrl.h	Tue May 16 09:40:38 2006 +0100
     1.2 +++ b/tools/libxc/xenctrl.h	Tue May 16 13:35:59 2006 +0100
     1.3 @@ -9,6 +9,7 @@
     1.4  #ifndef XENCTRL_H
     1.5  #define XENCTRL_H
     1.6  
     1.7 +#include <stddef.h>
     1.8  #include <stdint.h>
     1.9  #include <sys/ptrace.h>
    1.10  #include <xen/xen.h>
     2.1 --- a/tools/xentrace/Makefile	Tue May 16 09:40:38 2006 +0100
     2.2 +++ b/tools/xentrace/Makefile	Tue May 16 13:35:59 2006 +0100
     2.3 @@ -14,7 +14,7 @@ CFLAGS  += -I $(XEN_LIBXC)
     2.4  HDRS     = $(wildcard *.h)
     2.5  OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
     2.6  
     2.7 -BIN      = xentrace tbctl setsize
     2.8 +BIN      = xentrace setsize
     2.9  LIBBIN   = 
    2.10  SCRIPTS  = xentrace_format
    2.11  MAN1     = $(wildcard *.1)
     3.1 --- a/tools/xentrace/setsize.c	Tue May 16 09:40:38 2006 +0100
     3.2 +++ b/tools/xentrace/setsize.c	Tue May 16 13:35:59 2006 +0100
     3.3 @@ -5,33 +5,37 @@
     3.4  
     3.5  int main(int argc, char * argv[])
     3.6  {
     3.7 -  unsigned int size;
     3.8 -  int xc_handle = xc_interface_open();
     3.9 +    unsigned long size;
    3.10 +    int xc_handle = xc_interface_open();
    3.11    
    3.12 -  if (xc_tbuf_get_size(xc_handle, &size) != 0) {
    3.13 -    perror("Failure to get tbuf info from Xen. Guess size is 0");
    3.14 -    printf("This may mean that tracing is not enabled in xen.\n");
    3.15 -    //    exit(1);
    3.16 -  }
    3.17 -  else
    3.18 -    printf("Current tbuf size: 0x%x\n", size);
    3.19 -  
    3.20 -  if (argc < 2)
    3.21 -    exit(0);
    3.22 +    if ( xc_tbuf_get_size(xc_handle, &size) != 0 )
    3.23 +    {
    3.24 +        perror("Failure to get tbuf info from Xen. Guess size is 0");
    3.25 +        printf("This may mean that tracing is not enabled in xen.\n");
    3.26 +    }
    3.27 +    else
    3.28 +    {
    3.29 +        printf("Current tbuf size: 0x%lx\n", size);
    3.30 +    }
    3.31  
    3.32 -  size = atoi(argv[1]);
    3.33 +    if (argc < 2)
    3.34 +        exit(0);
    3.35  
    3.36 -  if (xc_tbuf_set_size(xc_handle, size) != 0) {
    3.37 -    perror("set_size Hypercall failure");
    3.38 -    exit(1);
    3.39 -  }
    3.40 -  printf("set_size succeeded.\n");
    3.41 +    size = atol(argv[1]);
    3.42 +
    3.43 +    if ( xc_tbuf_set_size(xc_handle, size) != 0 )
    3.44 +    {
    3.45 +        perror("set_size Hypercall failure");
    3.46 +        exit(1);
    3.47 +    }
    3.48 +    printf("set_size succeeded.\n");
    3.49    
    3.50 -  if (xc_tbuf_get_size(xc_handle, &size) != 0)
    3.51 -    perror("Failure to get tbuf info from Xen. Tracing must be enabled first");
    3.52 -  else
    3.53 -    printf("New tbuf size: 0x%x\n", size);
    3.54 +    if (xc_tbuf_get_size(xc_handle, &size) != 0)
    3.55 +        perror("Failure to get tbuf info from Xen."
    3.56 +               " Tracing must be enabled first");
    3.57 +    else
    3.58 +        printf("New tbuf size: 0x%lx\n", size);
    3.59    
    3.60 -  xc_interface_close(xc_handle);
    3.61 -  return 0;
    3.62 +    xc_interface_close(xc_handle);
    3.63 +    return 0;
    3.64  }