summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-12-13 00:13:59 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-12-12 23:39:01 -0800
commitcc0c857ceba2bec066cb4167f4c84dfea925546b (patch)
treec3ed6b2ac0fa3d39028ae14c465d7a6a051f587b /xlators
parent11b1c0735d7709d37ef775ff036e473a1b60801d (diff)
performance/io-cache: 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')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c48
1 files changed, 28 insertions, 20 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index f124d0807..7adfaa40a 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -1548,36 +1548,40 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr)
&cache_size) != 0) {
gf_log ("io-cache", GF_LOG_ERROR,
"invalid number format \"%s\" of "
- "\"option cache-size\" Defaulting"
- "to old value", cache_size_string);
- *op_errstr = gf_strdup ("Error, Invalid Format");
+ "\"option cache-size\" Defaulting"
+ "to old value", cache_size_string);
+ *op_errstr = gf_strdup ("Error, Invalid Format");
ret = -1;
goto out;
}
if (cache_size < ( 4 * GF_UNIT_MB)) {
gf_log(this->name, GF_LOG_WARNING, "Reconfiguration"
- "'option cache-size %s' failed , Max value"
- "can be 4MiB, Defaulting to old value (%d)"
- , cache_size_string, cache_size);
- *op_errstr = gf_strdup ("Error, Cannot be less than 4MB");
+ "'option cache-size %s' failed , Max value"
+ "can be 4MiB, Defaulting to old value "
+ "(%"PRIu64")", cache_size_string,
+ cache_size);
+ *op_errstr = gf_strdup ("Error, "
+ "Cannot be less than 4MB");
ret = -1;
goto out;
}
if (cache_size > ( 6 * GF_UNIT_GB)) {
gf_log(this->name, GF_LOG_WARNING, "Validation"
- "'option cache-size %s' failed , Max value"
- "can be 6GiB, Defaulting to old value (%d)"
- , cache_size_string, cache_size);
- *op_errstr = gf_strdup ("Error, Cannot be more than 6GB");
+ "'option cache-size %s' failed , Max value"
+ "can be 6GiB, Defaulting to old value "
+ "(%"PRIu64")", cache_size_string,
+ cache_size);
+ *op_errstr = gf_strdup ("Error, Cannot be more "
+ "than 6GB");
ret = -1;
goto out;
}
gf_log (this->name, GF_LOG_DEBUG, "Validated "
- " cache-size %"PRIu64"", cache_size);
+ " cache-size %"PRIu64"", cache_size);
}
@@ -1702,19 +1706,23 @@ reconfigure (xlator_t *this, dict_t *options)
}
if (cache_size < (4 * GF_UNIT_MB)) {
- gf_log(this->name, GF_LOG_ERROR, "Reconfiguration"
- "'option cache-size %s' failed , Max value"
- "can be 4MiB, Defaulting to old value (%d)"
- , cache_size_string, table->cache_size);
+ gf_log(this->name, GF_LOG_ERROR,
+ "Reconfiguration"
+ "'option cache-size %s' failed , "
+ "Max value can be 4MiB, Defaulting to "
+ "old value (%"PRIu64")",
+ cache_size_string, table->cache_size);
ret = -1;
goto out;
}
if (cache_size > (6 * GF_UNIT_GB)) {
- gf_log (this->name, GF_LOG_ERROR, "Reconfiguration"
- "'option cache-size %s' failed , Max value"
- "can be 6GiB, Defaulting to old value (%d)"
- , cache_size_string, table->cache_size);
+ gf_log (this->name, GF_LOG_ERROR,
+ "Reconfiguration"
+ "'option cache-size %s' failed , "
+ "Max value can be 6GiB, Defaulting to "
+ "old value (%"PRIu64")",
+ cache_size_string, table->cache_size);
ret = -1;
goto out;
}