summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/globalvar.c14
-rw-r--r--include/globalvar.h10
2 files changed, 24 insertions, 0 deletions
diff --git a/common/globalvar.c b/common/globalvar.c
index 6dde1f8..fb69db9 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -529,6 +529,20 @@ int globalvar_add_simple_enum(const char *name, int *value,
return 0;
}
+int globalvar_add_simple_bitmask(const char *name, unsigned long *value,
+ const char * const *names, int max)
+{
+ struct param_d *p;
+
+ p = dev_add_param_bitmask(&global_device, name, NULL, NULL,
+ value, names, max, NULL);
+
+ if (IS_ERR(p))
+ return PTR_ERR(p);
+
+ return 0;
+}
+
int globalvar_add_simple_ip(const char *name, IPaddr_t *ip)
{
struct param_d *p;
diff --git a/include/globalvar.h b/include/globalvar.h
index 2322efb..2a5d8a1 100644
--- a/include/globalvar.h
+++ b/include/globalvar.h
@@ -24,6 +24,8 @@ int globalvar_add_simple_int(const char *name, int *value,
int globalvar_add_simple_bool(const char *name, int *value);
int globalvar_add_simple_enum(const char *name, int *value,
const char * const *names, int max);
+int globalvar_add_simple_bitmask(const char *name, unsigned long *value,
+ const char * const *names, int max);
int globalvar_add_simple_ip(const char *name, IPaddr_t *ip);
int nvvar_load(void);
@@ -63,6 +65,14 @@ static inline int globalvar_add_simple_enum(const char *name,
return 0;
}
+static inline int globalvar_add_simple_bitmask(const char *name,
+ unsigned long *value,
+ const char * const *names,
+ int max)
+{
+ return 0;
+}
+
static inline int globalvar_add_simple_ip(const char *name,
IPaddr_t *ip)
{