Rev | Line | |
---|
[34] | 1 | #include <stdio.h> |
---|
| 2 | #include <stdlib.h> |
---|
| 3 | #include <string.h> |
---|
| 4 | |
---|
| 5 | #include "xs.h" |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | int main(int argc, char **argv) |
---|
| 9 | { |
---|
| 10 | struct xs_handle * xsh; |
---|
| 11 | |
---|
| 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 | } |
---|
| 22 | |
---|
| 23 | xsh = xs_daemon_open(); |
---|
| 24 | |
---|
| 25 | if (xsh == NULL) { |
---|
| 26 | fprintf(stderr, "Failed to contact Xenstored.\n"); |
---|
| 27 | return 1; |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | xs_debug_command(xsh, argv[1], NULL, 0); |
---|
| 31 | |
---|
| 32 | xs_daemon_close(xsh); |
---|
| 33 | |
---|
| 34 | return 0; |
---|
| 35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.