From 151c120908fbd8e18072a6e64a641911c307a51c Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Wed, 22 Sep 2010 03:32:14 +0000 Subject: core: Introduce string representation of GF_EVENTS Signed-off-by: Shehjar Tikoo Signed-off-by: Vijay Bellur BUG: 1643 (Initial requests after mount ESTALE if DHT subvolumes connect after nfs startup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1643 --- libglusterfs/src/globals.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libglusterfs/src/globals.c') diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c index e845b3dc..fcb2f9f6 100644 --- a/libglusterfs/src/globals.c +++ b/libglusterfs/src/globals.c @@ -334,3 +334,26 @@ glusterfs_globals_init () out: return ret; } + + +char eventstring[GF_EVENT_MAXVAL][64] = { + "Invalid event", + "Parent Up", + "Poll In", + "Poll Out", + "Poll Err", + "Child Up", + "Child Down", + "Child Connecting", + "Transport Cleanup", + "Transport Connected", + "Volfile Modified", +}; + +/* Copy the string ptr contents if needed for yourself */ +char * +glusterfs_strevent (glusterfs_event_t ev) +{ + return eventstring[ev]; +} + -- cgit