diff options
author | emellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com> | 2006-03-02 02:09:23 +0100 |
---|---|---|
committer | emellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com> | 2006-03-02 02:09:23 +0100 |
commit | 06d17943f0cd4f1386e2dfbfbffa3e29bd458b10 (patch) | |
tree | 753879768245c9e23bd8d471512e397a02566859 /tools/xenstore/xenstore_control.c | |
parent | 8920f45cc8bbbad7fdf478673f8119adda58cfa0 (diff) | |
download | xen-06d17943f0cd4f1386e2dfbfbffa3e29bd458b10.tar.gz xen-06d17943f0cd4f1386e2dfbfbffa3e29bd458b10.tar.bz2 xen-06d17943f0cd4f1386e2dfbfbffa3e29bd458b10.zip |
Added a basic integrity checker, and some basic ability to recover from store
corruption, rather than just spewing error messages and exiting.
Added a xenstore-control executable, which sends commands to xenstored.
Currently, the only command is 'check', which triggers an integrity check.
(The integrity check is also triggered whenever a corrupted store is detected).
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/xenstore/xenstore_control.c')
-rw-r--r-- | tools/xenstore/xenstore_control.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/xenstore/xenstore_control.c b/tools/xenstore/xenstore_control.c new file mode 100644 index 0000000000..80685c59d7 --- /dev/null +++ b/tools/xenstore/xenstore_control.c @@ -0,0 +1,28 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "xs.h" + + +int main(int argc, char **argv) +{ + if (argc < 2 || + strcmp(argv[1], "check")) + { + fprintf(stderr, + "Usage:\n" + "\n" + " %s check\n" + "\n", argv[0]); + return 2; + } + + struct xs_handle * xsh = xs_daemon_open(); + + xs_debug_command(xsh, argv[1], NULL, 0); + + xs_daemon_close(xsh); + + return 0; +} |