From 2d470cd910b49976befea664ae5cc7ea6aa10020 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 21 Feb 2012 10:45:32 -0800 Subject: libglusterfs/options: Cleanup xlator percent_sizet code. Change-Id: I1a39252d6c26f7e30b77ef682b8b3cdcde8a4a51 BUG: 769691 Signed-off-by: Harshavardhana Reviewed-on: http://review.gluster.com/2619 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- libglusterfs/src/common-utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libglusterfs/src/common-utils.h') diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index 63566fb53bc..67ad5ac8e83 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -69,6 +69,8 @@ void trap (void); #define GF_UNIT_TB_STRING "TB" #define GF_UNIT_PB_STRING "PB" +#define GF_UNIT_PERCENT_STRING "%" + #define GEOREP "geo-replication" #define GHADOOP "glusterfs-hadoop" @@ -421,6 +423,8 @@ int gf_string2uint32_base10 (const char *str, uint32_t *n); int gf_string2uint64_base10 (const char *str, uint64_t *n); int gf_string2bytesize (const char *str, uint64_t *n); +int gf_string2percent_or_bytesize (const char *str, uint64_t *n, + gf_boolean_t *is_percent); int gf_string2boolean (const char *str, gf_boolean_t *b); int gf_string2percent (const char *str, uint32_t *n); -- cgit