From 01bb20f4aa42f735b72baff72ea770289851b46c Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 7 Feb 2013 13:50:06 +0530 Subject: glusterd: log changes in volume set and volume reset codepath Change-Id: Ieed9194768e434e54ea7d3d42b705eb600445cf4 BUG: 812356 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/4543 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 9704686ac..f491c0d0c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -842,6 +842,7 @@ glusterd_check_option_exists (char *key, char **completion) struct volopt_map_entry vme = {0,}; struct volopt_map_entry *vmep = NULL; int ret = 0; + xlator_t *this = THIS; (void)vme; (void)vmep; @@ -850,7 +851,8 @@ glusterd_check_option_exists (char *key, char **completion) if (completion) { ret = option_complete (key, completion); if (ret) { - gf_log ("", GF_LOG_ERROR, "Out of memory"); + gf_log (this->name, GF_LOG_ERROR, + "Out of memory"); return -1; } @@ -876,7 +878,7 @@ glusterd_check_option_exists (char *key, char **completion) trie: ret = volopt_trie (key, completion); if (ret) { - gf_log ("", GF_LOG_ERROR, + gf_log (this->name, GF_LOG_ERROR, "Some error occurred during keyword hinting"); } @@ -1943,9 +1945,9 @@ glusterd_get_volopt_content (dict_t * ctx, gf_boolean_t xml_out) gf_log ("glusterd", GF_LOG_ERROR, "Libxml not present"); #endif } else { - snprintf (tmp_str, 2048, "Option: %s\nDefault " - "Value: %s\nDescription: %s\n\n", - vme->key, def_val, descr); + snprintf (tmp_str, sizeof (tmp_str), "Option: %s\nDefault " + "Value: %s\nDescription: %s\n\n", + vme->key, def_val, descr); strcat (output_string, tmp_str); } -- cgit