From 20f8dc8ba11321a37437e4286f61be72de5256f1 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Wed, 18 Jul 2012 16:12:01 -0700 Subject: libglusterfs/options: enable validator macros for type 'double' Values like 'entry-timeout' and 'attribute-timeout' in FUSE are of C type double. Enable support in the options framework for using this type. Change-Id: If1a619595a5925937e88540710860df27347acd0 BUG: 841417 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.com/3697 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- libglusterfs/src/options.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libglusterfs/src/options.h') diff --git a/libglusterfs/src/options.h b/libglusterfs/src/options.h index 1775ad9ea71..309a9ab9a5d 100644 --- a/libglusterfs/src/options.h +++ b/libglusterfs/src/options.h @@ -55,8 +55,8 @@ typedef struct volume_options { char *key[ZR_VOLUME_MAX_NUM_KEY]; /* different key, same meaning */ volume_option_type_t type; - int64_t min; /* 0 means no range */ - int64_t max; /* 0 means no range */ + double min; /* 0 means no range */ + double max; /* 0 means no range */ char *value[ZR_OPTION_MAX_ARRAY_SIZE]; /* If specified, will check for one of the value from this array */ @@ -110,6 +110,7 @@ DECLARE_INIT_OPT(uint64_t, percent_or_size); DECLARE_INIT_OPT(gf_boolean_t, bool); DECLARE_INIT_OPT(xlator_t *, xlator); DECLARE_INIT_OPT(char *, path); +DECLARE_INIT_OPT(double, double); #define DEFINE_INIT_OPT(type_t, type, conv) \ @@ -189,6 +190,7 @@ DECLARE_RECONF_OPT(uint64_t, percent_or_size); DECLARE_RECONF_OPT(gf_boolean_t, bool); DECLARE_RECONF_OPT(xlator_t *, xlator); DECLARE_RECONF_OPT(char *, path); +DECLARE_RECONF_OPT(double, double); #define DEFINE_RECONF_OPT(type_t, type, conv) \ -- cgit