summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/options.h
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2012-07-18 16:12:01 -0700
committerAnand Avati <avati@redhat.com>2012-07-19 09:06:18 -0700
commit20f8dc8ba11321a37437e4286f61be72de5256f1 (patch)
tree615a0acb7e9ce0f6b4b0cf597fdf4f7575892df0 /libglusterfs/src/options.h
parent7018d7178e366146881d693e0159e13307e888ee (diff)
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 <avati@redhat.com> Reviewed-on: http://review.gluster.com/3697 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src/options.h')
-rw-r--r--libglusterfs/src/options.h6
1 files changed, 4 insertions, 2 deletions
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) \