diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-12-13 03:33:21 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-12-14 19:41:47 -0800 |
commit | 3fd60a81d3a536cfd005e7fe3171d397d1019067 (patch) | |
tree | f14b7f19ccd4c11e6a5248a3c777b453cb6ef50a /xlators/cluster/afr/src/afr.c | |
parent | 04fe9457923ff74e9fc396ed13c6a5eef4810493 (diff) |
cluster/replicate: fix warnings due to format string mismatches during invocation of gf_log.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2211 ((re)introduce warnings for format string/parameter mismatch)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2211
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index 5f586e20124..9fb6bc04bc9 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -129,9 +129,10 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) temp_ret = gf_string2boolean (self_heal, &data_self_heal); if (temp_ret < 0) { gf_log (this->name, GF_LOG_WARNING, - "Validation failed for data self heal", - self_heal); - *op_errstr = gf_strdup ("Error, option should be boolean"); + "Validation failed for data self heal " + "(given-string = %s)", self_heal); + *op_errstr = gf_strdup ("Error, option should be " + "boolean"); ret = -1; goto out; } @@ -139,7 +140,7 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) gf_log (this->name, GF_LOG_DEBUG, "Reconfiguring 'option data" - "-self-heal %s'.", self_heal); + "-self-heal %s'.", self_heal); } dict_ret = dict_get_str (options, "entry-self-heal", @@ -148,9 +149,11 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) temp_ret = gf_string2boolean (self_heal, &entry_self_heal); if (temp_ret < 0) { gf_log (this->name, GF_LOG_WARNING, - "Validation faled for entry-self-heal", + "Validation faled for entry-self-heal" + " (given string = %s)", self_heal); - *op_errstr = gf_strdup ("Error, option should be boolean"); + *op_errstr = gf_strdup ("Error, option should be " + "boolean"); ret = -1; goto out; } @@ -158,7 +161,7 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) gf_log (this->name, GF_LOG_DEBUG, "Validated 'option entry" - "-self-heal %s'.", self_heal); + "-self-heal %s'.", self_heal); } @@ -168,9 +171,10 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) temp_ret = gf_string2boolean (str_readdir, &strict_readdir); if (temp_ret < 0) { gf_log (this->name, GF_LOG_WARNING, - "Validation faled for strict_readdir", - str_readdir); - *op_errstr = gf_strdup ("Error, option should be boolean"); + "Validation faled for strict_readdir " + "(given-string = %s)", str_readdir); + *op_errstr = gf_strdup ("Error, option should be " + "boolean"); ret = -1; goto out; } @@ -178,7 +182,7 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) gf_log (this->name, GF_LOG_DEBUG, "Validated 'option strict" - "-readdir %s'.", str_readdir); + "-readdir %s'.", str_readdir); } dict_ret = dict_get_int32 (options, "data-self-heal-window-size", @@ -210,7 +214,8 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) if (temp_ret < 0) { gf_log (this->name, GF_LOG_WARNING, "Validation faled for data-change-log"); - *op_errstr = gf_strdup ("Error, option should be boolean"); + *op_errstr = gf_strdup ("Error, option should be " + "boolean"); ret = -1; goto out; } @@ -218,7 +223,7 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) gf_log (this->name, GF_LOG_DEBUG, "Validated 'option data-" - "change-log %s'.", change_log); + "change-log %s'.", change_log); } dict_ret = dict_get_str (options, "metadata-change-log", @@ -229,7 +234,8 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) if (temp_ret < 0) { gf_log (this->name, GF_LOG_WARNING, "Validation faild for metadata-change-log"); - *op_errstr = gf_strdup ("Error, option should be boolean"); + *op_errstr = gf_strdup ("Error, option should be " + "boolean"); ret = -1; goto out; } @@ -237,7 +243,7 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) gf_log (this->name, GF_LOG_DEBUG, "Validated 'option metadata-" - "change-log %s'.", change_log); + "change-log %s'.", change_log); } dict_ret = dict_get_str (options, "entry-change-log", @@ -247,7 +253,8 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) if (temp_ret < 0) { gf_log (this->name, GF_LOG_WARNING, "Validation faild for entr-change-log"); - *op_errstr = gf_strdup ("Error, option should be boolean"); + *op_errstr = gf_strdup ("Error, option should be " + "boolean"); ret = -1; goto out; } @@ -262,11 +269,13 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) dict_ret = dict_get_str (options, "optimistic-change-log", &change_log); if (dict_ret == 0) { - temp_ret = gf_string2boolean (change_log, &optimistic_change_log); + temp_ret = gf_string2boolean (change_log, + &optimistic_change_log); if (temp_ret < 0) { gf_log (this->name, GF_LOG_WARNING, "Validation faled for optimistic-change-log"); - *op_errstr = gf_strdup ("Error, option should be boolean"); + *op_errstr = gf_strdup ("Error, option should be " + "boolean"); ret = -1; goto out; } @@ -274,7 +283,7 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) gf_log (this->name, GF_LOG_DEBUG, "Validated 'option optimistic-" - "change-log %s'.", change_log); + "change-log %s'.", change_log); } |