xenstore: cleanup
PATCH 1/1 xenstore: cleanup
Hi!
Attached patch makes xenstore functions static which have no prototype and removes unused talloc_open().
Signed-off-by Christoph Egger <[email protected]>
Signature · 12 lines
AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
tools/xenstore/talloc.c +1 -1
@@ -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;
tools/xenstore/tdb.c +2 -2
@@ -28,7 +28,7 @@#ifndef _SAMBA_BUILD_ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H #include <config.h> #endif
@@ -731,7 +731,7 @@ static int expand_file(TDB_CONTEXT *tdb,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)));
tools/xenstore/xenstore_client.c +1 -1
@@ -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;
tools/xenstore/xenstored_core.c +0 -17
@@ -347,23 +347,6 @@ static int destroy_fd(void *_fd)int *fd = _fd;close (*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? */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel