diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-02-19 14:40:12 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-02-19 14:40:51 +0530 |
commit | 245ee93f275301ad7f277b37614a30853d9def36 (patch) | |
tree | 2a47468e2a07368799a5a4473275eaab4c03913b /utils/common.c | |
parent | eb77f631c62e54644ca0515b619a06fd330a2d63 (diff) |
gluster-block: refactor return values
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'utils/common.c')
-rw-r--r-- | utils/common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/common.c b/utils/common.c index dfa6bc8..a605f0d 100644 --- a/utils/common.c +++ b/utils/common.c @@ -14,7 +14,7 @@ ssize_t -glusterBlockCreateParseSize(char *value) +glusterBlockCreateParseSize(const char *dom, char *value) { char *postfix; char *tmp; @@ -26,7 +26,7 @@ glusterBlockCreateParseSize(char *value) sizef = strtod(value, &postfix); if (sizef < 0) { - ERROR("%s", "size cannot be negative number\n"); + LOG(dom, GB_LOG_ERROR, "%s", "size cannot be negative number"); return -1; } @@ -66,9 +66,9 @@ glusterBlockCreateParseSize(char *value) return sizef; break; default: - /*TODO: Log this instead of printing - ERROR("%s", "You may use k/K, M, G or T suffixes for " - "kilobytes, megabytes, gigabytes and terabytes."); */ + LOG(dom, GB_LOG_ERROR, "%s", + "You may use k/K, M, G or T suffixes for kilobytes, " + "megabytes, gigabytes and terabytes."); return -1; } } |