summaryrefslogtreecommitdiffstats
path: root/utils/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/common.c')
-rw-r--r--utils/common.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/utils/common.c b/utils/common.c
index 4b9237f..98cc0ef 100644
--- a/utils/common.c
+++ b/utils/common.c
@@ -59,33 +59,31 @@ glusterBlockParseSize(const char *dom, char *value)
tmp = tmp + 1;
}
- switch (*tmp) {
- case 'Y':
+ switch (tolower(*tmp)) {
+ case 'y':
sizef *= 1024;
/* fall through */
- case 'Z':
+ case 'z':
sizef *= 1024;
/* fall through */
- case 'E':
+ case 'e':
sizef *= 1024;
/* fall through */
- case 'P':
+ case 'p':
sizef *= 1024;
/* fall through */
- case 'T':
+ case 't':
sizef *= 1024;
/* fall through */
- case 'G':
+ case 'g':
sizef *= 1024;
/* fall through */
- case 'M':
+ case 'm':
sizef *= 1024;
/* fall through */
- case 'K':
case 'k':
sizef *= 1024;
/* fall through */
- case 'B':
case 'b':
case '\0':
break;
@@ -106,7 +104,7 @@ glusterBlockParseSize(const char *dom, char *value)
fail:
LOG(dom, GB_LOG_ERROR, "%s",
"Unknown size unit. "
- "You may use b/B, k/K(iB), M(iB), G(iB), and T(iB) suffixes for "
+ "You may use b/B, k/K(iB), m/M(iB), g/G(iB), and t/T(iB) suffixes for "
"bytes, kibibytes, mebibytes, gibibytes, and tebibytes.");
return -1;
}