From 245ee93f275301ad7f277b37614a30853d9def36 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Sun, 19 Feb 2017 14:40:12 +0530 Subject: gluster-block: refactor return values Signed-off-by: Prasanna Kumar Kalever --- utils/common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'utils/common.c') 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; } } -- cgit