aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstore_control.c
blob: 0a108df0aa2d21dbc0e85c3645f2a7fd0311ca00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "xenstore.h"


int main(int argc, char **argv)
{
  struct xs_handle * xsh;

  if (argc < 2 ||
      strcmp(argv[1], "check"))
  {
    fprintf(stderr,
            "Usage:\n"
            "\n"
            "       %s check\n"
            "\n", argv[0]);
    return 2;
  }

  xsh = xs_daemon_open();

  if (xsh == NULL) {
    fprintf(stderr, "Failed to contact Xenstored.\n");
    return 1;
  }

  xs_debug_command(xsh, argv[1], NULL, 0);

  xs_daemon_close(xsh);

  return 0;
}