diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-07-15 13:19:26 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-07-15 13:19:26 +0100 |
commit | 7eb8d34c180bf88522822ebd487747ad7353335a (patch) | |
tree | a1fa4d5eab79c5882ff6e57cb4f37a9a15ce54e0 /tools/xenstore | |
parent | 533a2a2773f04d175bda34ea2f0202616b68be2b (diff) | |
download | xen-7eb8d34c180bf88522822ebd487747ad7353335a.tar.gz xen-7eb8d34c180bf88522822ebd487747ad7353335a.tar.bz2 xen-7eb8d34c180bf88522822ebd487747ad7353335a.zip |
tools: Declare functions static where they should be, and provide
proper prototypes for others as required.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Diffstat (limited to 'tools/xenstore')
-rw-r--r-- | tools/xenstore/talloc.c | 2 | ||||
-rw-r--r-- | tools/xenstore/tdb.c | 4 | ||||
-rw-r--r-- | tools/xenstore/xenstore_client.c | 2 | ||||
-rw-r--r-- | tools/xenstore/xenstored_core.c | 17 |
4 files changed, 4 insertions, 21 deletions
diff --git a/tools/xenstore/talloc.c b/tools/xenstore/talloc.c index 8bff92b3bc..a3d85e34e7 100644 --- a/tools/xenstore/talloc.c +++ b/tools/xenstore/talloc.c @@ -500,7 +500,7 @@ void *talloc_init(const char *fmt, ...) should probably not be used in new code. It's in here to keep the talloc code consistent across Samba 3 and 4. */ -void talloc_free_children(void *ptr) +static void talloc_free_children(void *ptr) { struct talloc_chunk *tc; diff --git a/tools/xenstore/tdb.c b/tools/xenstore/tdb.c index 7ebf37a941..e04c9aec21 100644 --- a/tools/xenstore/tdb.c +++ b/tools/xenstore/tdb.c @@ -28,7 +28,7 @@ #ifndef _SAMBA_BUILD_ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -731,7 +731,7 @@ update: static int expand_file(TDB_CONTEXT *tdb, tdb_off size, tdb_off addition) { char buf[1024]; -#if HAVE_FTRUNCATE_EXTEND +#ifdef HAVE_FTRUNCATE_EXTEND if (ftruncate(tdb->fd, size+addition) != 0) { TDB_LOG((tdb, 0, "expand_file ftruncate to %d failed (%s)\n", size+addition, strerror(errno))); diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c index aca23ed4c4..9d00c18259 100644 --- a/tools/xenstore/xenstore_client.c +++ b/tools/xenstore/xenstore_client.c @@ -121,7 +121,7 @@ static int show_whole_path = 0; #define MIN(a, b) (((a) < (b))? (a) : (b)) -void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms) +static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms) { static struct expanding_buffer ebuf; char **e; diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index b391319a15..90bfd05b91 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -349,23 +349,6 @@ static int destroy_fd(void *_fd) return 0; } -/* Return a pointer to an fd, self-closing and attached to this pathname. */ -int *talloc_open(const char *pathname, int flags, int mode) -{ - int *fd; - - fd = talloc(pathname, int); - *fd = open(pathname, flags, mode); - if (*fd < 0) { - int saved_errno = errno; - talloc_free(fd); - errno = saved_errno; - return NULL; - } - talloc_set_destructor(fd, destroy_fd); - return fd; -} - /* Is child a subnode of parent, or equal? */ bool is_child(const char *child, const char *parent) { |