ia64/xen-unstable

view tools/xentrace/tbctl.c @ 7778:0b4596caf761

nloopbacks default is now 8. So vifnum of greater than 7 requires
an adjustment to nloopbacks. Warning comment updated.

Signed-off-by: Nivedita Singhvi (niv@us.ibm.com)
author kaf24@firebug.cl.cam.ac.uk
date Fri Nov 11 10:46:36 2005 +0100 (2005-11-11)
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 }