debuggers.hg

view tools/xenstore/xenstore_control.c @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
5 #include "xs.h"
8 int main(int argc, char **argv)
9 {
10 struct xs_handle * xsh;
12 if (argc < 2 ||
13 strcmp(argv[1], "check"))
14 {
15 fprintf(stderr,
16 "Usage:\n"
17 "\n"
18 " %s check\n"
19 "\n", argv[0]);
20 return 2;
21 }
23 xsh = xs_daemon_open();
25 if (xsh == NULL) {
26 fprintf(stderr, "Failed to contact Xenstored.\n");
27 return 1;
28 }
30 xs_debug_command(xsh, argv[1], NULL, 0);
32 xs_daemon_close(xsh);
34 return 0;
35 }