diff options
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/common.c | 20 | ||||
| -rw-r--r-- | utils/utils.h | 1 | 
2 files changed, 10 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;  } diff --git a/utils/utils.h b/utils/utils.h index bd073ad..8a30d25 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -24,6 +24,7 @@  # include  <time.h>  # include  <limits.h>  # include  <sys/time.h> +# include  <ctype.h>  # define  GB_LOGDIR              DATADIR "/log/gluster-block"  # define  GB_INFODIR             DATADIR "/run"  | 
