From e80a04f7850144449a0d2fc4f9d40d0227f170cc Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 14 Mar 2013 15:54:07 +0530 Subject: protocol/client: Print valid loc identifiers Change-Id: I45f91105862a2484b8906a7a63b98ab4aaf80d05 BUG: 924643 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4683 Reviewed-by: Jeff Darcy Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/xlator.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/xlator.c') diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 1be4c86b2..348f48c48 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -637,6 +637,21 @@ out: return ret; } +char* +loc_gfid_utoa (loc_t *loc) +{ + uuid_t gfid={0}; + + if (!loc) + goto out; + else if (!uuid_is_null (loc->gfid)) + uuid_copy (gfid, loc->gfid); + else if (loc->inode && (!uuid_is_null (loc->inode->gfid))) + uuid_copy (gfid, loc->inode->gfid); +out: + return uuid_utoa (gfid); +} + int loc_copy (loc_t *dst, loc_t *src) { @@ -676,7 +691,6 @@ err: return ret; } - int xlator_list_destroy (xlator_list_t *list) { -- cgit