ia64/xen-unstable
view tools/xentrace/tbctl.c @ 8740:3d7ea7972b39
Update patches for linux 2.6.15.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Thu Feb 02 17:16:00 2006 +0000 (2006-02-02) |
parents | f33f18fbf2cb |
children |
line source
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <errno.h>
4 #include <xenctrl.h>
6 int main(int argc, char * argv[])
7 {
8 int enable;
9 int xc_handle = xc_interface_open();
11 if (argc < 2) {
12 printf("usage: %s [0|1]\n", argv[0]);
13 exit(1);
14 }
15 enable = atoi(argv[1]);
17 if (xc_tbuf_enable(xc_handle, enable) != 0) {
18 perror("Enable/Disable Hypercall failure");
19 exit(1);
20 }
21 else
22 printf("Tracing now %s\n", (enable ? "enabled" : "disabled"));
24 xc_interface_close(xc_handle);
25 return 0;
26 }