# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID bc7d49df165151a8431b33bd6ca58f0d18e9be46
# Parent df1521633fb519727adb80f15ea1f2e5b69dc3df
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@xxxxxxxxxxxxx>
---
tools/libxc/xenctrl.h | 1
tools/xentrace/Makefile | 2 -
tools/xentrace/setsize.c | 56 +++++++++++++++++++++++++----------------------
3 files changed, 32 insertions(+), 27 deletions(-)
diff -r df1521633fb5 -r bc7d49df1651 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Tue May 16 09:40:38 2006 +0100
+++ b/tools/libxc/xenctrl.h Tue May 16 13:35:59 2006 +0100
@@ -9,6 +9,7 @@
#ifndef XENCTRL_H
#define XENCTRL_H
+#include <stddef.h>
#include <stdint.h>
#include <sys/ptrace.h>
#include <xen/xen.h>
diff -r df1521633fb5 -r bc7d49df1651 tools/xentrace/Makefile
--- a/tools/xentrace/Makefile Tue May 16 09:40:38 2006 +0100
+++ b/tools/xentrace/Makefile Tue May 16 13:35:59 2006 +0100
@@ -14,7 +14,7 @@ HDRS = $(wildcard *.h)
HDRS = $(wildcard *.h)
OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
-BIN = xentrace tbctl setsize
+BIN = xentrace setsize
LIBBIN =
SCRIPTS = xentrace_format
MAN1 = $(wildcard *.1)
diff -r df1521633fb5 -r bc7d49df1651 tools/xentrace/setsize.c
--- a/tools/xentrace/setsize.c Tue May 16 09:40:38 2006 +0100
+++ b/tools/xentrace/setsize.c Tue May 16 13:35:59 2006 +0100
@@ -5,33 +5,37 @@
int main(int argc, char * argv[])
{
- unsigned int size;
- int xc_handle = xc_interface_open();
+ unsigned long size;
+ int xc_handle = xc_interface_open();
- if (xc_tbuf_get_size(xc_handle, &size) != 0) {
- perror("Failure to get tbuf info from Xen. Guess size is 0");
- printf("This may mean that tracing is not enabled in xen.\n");
- // exit(1);
- }
- else
- printf("Current tbuf size: 0x%x\n", size);
+ if ( xc_tbuf_get_size(xc_handle, &size) != 0 )
+ {
+ perror("Failure to get tbuf info from Xen. Guess size is 0");
+ printf("This may mean that tracing is not enabled in xen.\n");
+ }
+ else
+ {
+ printf("Current tbuf size: 0x%lx\n", size);
+ }
+
+ if (argc < 2)
+ exit(0);
+
+ size = atol(argv[1]);
+
+ if ( xc_tbuf_set_size(xc_handle, size) != 0 )
+ {
+ perror("set_size Hypercall failure");
+ exit(1);
+ }
+ printf("set_size succeeded.\n");
- if (argc < 2)
- exit(0);
-
- size = atoi(argv[1]);
-
- if (xc_tbuf_set_size(xc_handle, size) != 0) {
- perror("set_size Hypercall failure");
- exit(1);
- }
- printf("set_size succeeded.\n");
+ if (xc_tbuf_get_size(xc_handle, &size) != 0)
+ perror("Failure to get tbuf info from Xen."
+ " Tracing must be enabled first");
+ else
+ printf("New tbuf size: 0x%lx\n", size);
- if (xc_tbuf_get_size(xc_handle, &size) != 0)
- perror("Failure to get tbuf info from Xen. Tracing must be enabled first");
- else
- printf("New tbuf size: 0x%x\n", size);
-
- xc_interface_close(xc_handle);
- return 0;
+ xc_interface_close(xc_handle);
+ return 0;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|