summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.h
diff options
context:
space:
mode:
authorHarshavardhana <fharshav@redhat.com>2012-02-21 10:45:32 -0800
committerVijay Bellur <vijay@gluster.com>2012-02-21 22:23:09 -0800
commit2d470cd910b49976befea664ae5cc7ea6aa10020 (patch)
tree227857d16bd8a235de00bdd3b8afddd9413ab869 /libglusterfs/src/common-utils.h
parent311de6f96c4fabf30f734e62996ec18817447e2f (diff)
libglusterfs/options: Cleanup xlator percent_sizet code.
Change-Id: I1a39252d6c26f7e30b77ef682b8b3cdcde8a4a51 BUG: 769691 Signed-off-by: Harshavardhana <fharshav@redhat.com> Reviewed-on: http://review.gluster.com/2619 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r--libglusterfs/src/common-utils.h4
1 files changed, 4 insertions, 0 deletions
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);