From f3648c88ebc6d58a10854d564d3fc2c82290ce13 Mon Sep 17 00:00:00 2001 From: Gaurav Date: Mon, 31 Jan 2011 04:25:23 +0000 Subject: Logging : New uuid to string conversion functions. Signed-off-by: Gaurav Signed-off-by: Anand V. Avati BUG: 2308 (Threadsafe uuid to string conversion function) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2308 --- libglusterfs/src/common-utils.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/common-utils.h') diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index ca0990aa5..ec14919b4 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -34,7 +34,7 @@ #include #ifndef GF_BSD_HOST_OS #include -#endif +#endif void trap (void); @@ -47,6 +47,7 @@ void trap (void); #include "glusterfs.h" #include "locking.h" #include "mem-pool.h" +#include "uuid.h" #define min(a,b) ((a)<(b)?(a):(b)) @@ -68,9 +69,9 @@ void trap (void); #define GF_UNIT_PB_STRING "PB" -enum _gf_boolean +enum _gf_boolean { - _gf_false = 0, + _gf_false = 0, _gf_true = 1 }; @@ -292,7 +293,7 @@ memdup (const void *ptr, size_t size) char *gf_trim (char *string); -int gf_strsplit (const char *str, const char *delim, +int gf_strsplit (const char *str, const char *delim, char ***tokens, int *token_count); int gf_volume_name_validate (const char *volume_name); @@ -343,5 +344,8 @@ char valid_host_name (char *address, int length); char valid_ipv4_address (char *address, int length); char valid_ipv6_address (char *address, int length); char valid_internet_address (char *address); + +char *uuid_utoa (uuid_t uuid); +char *uuid_utoa_r (uuid_t uuid, char *dst); #endif /* _COMMON_UTILS_H */ -- cgit