aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_core.h
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-06-24 08:16:13 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-06-24 08:16:13 +0000
commitc8cf49e882fd2e0aa7450e25c7b5b785dc97c725 (patch)
treef07f344f0d31d1177f356479c0316794edd57ad9 /tools/xenstore/xenstored_core.h
parent8e6ffdae8e693b28fbe6d753257e3aefd07c9c31 (diff)
downloadxen-c8cf49e882fd2e0aa7450e25c7b5b785dc97c725.tar.gz
xen-c8cf49e882fd2e0aa7450e25c7b5b785dc97c725.tar.bz2
xen-c8cf49e882fd2e0aa7450e25c7b5b785dc97c725.zip
bitkeeper revision 1.1748 (42bbc14djIjScNrLp20eDhlxUjQl4g)
xenstored_transaction.c, xenstored_core.h, xenstored_core.c, TODO: Update TODO list Wrap opendir in talloc so it gets cleaned up on OOM. Remove last call to system by open-coding "cp -al" to create transaction. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'tools/xenstore/xenstored_core.h')
-rw-r--r--tools/xenstore/xenstored_core.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/xenstore/xenstored_core.h b/tools/xenstore/xenstored_core.h
index a82ae8b22e..4ad207537b 100644
--- a/tools/xenstore/xenstored_core.h
+++ b/tools/xenstore/xenstored_core.h
@@ -20,6 +20,8 @@
#ifndef _XENSTORED_CORE_H
#define _XENSTORED_CORE_H
+#include <sys/types.h>
+#include <dirent.h>
#include <stdbool.h>
#include <stdint.h>
#include <errno.h>
@@ -129,7 +131,16 @@ void handle_output(struct connection *conn);
/* Is this a valid node name? */
bool is_valid_nodename(const char *node);
+/* Return a pointer to an open dir, self-closig and attached to pathname. */
+DIR **talloc_opendir(const char *pathname);
+
+/* Return a pointer to an fd, self-closing and attached to this pathname. */
+int *talloc_open(const char *pathname, int flags, int mode);
+
/* Convenient talloc-style destructor for paths. */
int destroy_path(void *path);
+/* Read entire contents of a talloced fd. */
+void *read_all(int *fd, unsigned int *size);
+
#endif /* _XENSTORED_CORE_H */