summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Davidson <james.davidson@vyatta.com>2012-09-04 12:19:16 -0700
committerJames Davidson <james.davidson@vyatta.com>2012-09-04 12:23:54 -0700
commit87facac8ab09b380a81c0b4836d49274af4ffc9e (patch)
treed5be7b627f4c266e02481357b5a9f592e1ba969d /src
parent209bd8dbf2ab76fbf9a7955cc29f3238f4878a62 (diff)
downloadvyatta-cfg-87facac8ab09b380a81c0b4836d49274af4ffc9e.tar.gz
vyatta-cfg-87facac8ab09b380a81c0b4836d49274af4ffc9e.zip
Add cstore_cfg_path_exists_effective C interface
Diffstat (limited to 'src')
-rw-r--r--src/cstore/cstore-c.cpp11
-rw-r--r--src/cstore/cstore-c.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/cstore/cstore-c.cpp b/src/cstore/cstore-c.cpp
index 86b544e..c3b5a37 100644
--- a/src/cstore/cstore-c.cpp
+++ b/src/cstore/cstore-c.cpp
@@ -62,6 +62,17 @@ cstore_cfg_path_exists(void *handle, const char *path_comps[], int num_comps)
}
int
+cstore_cfg_path_exists_effective(void *handle, const char *path_comps[], int num_comps)
+{
+ if (handle) {
+ Cpath p(path_comps, num_comps);
+ Cstore *cs = (Cstore *) handle;
+ return (cs->cfgPathEffective(p) ? 1 : 0);
+ }
+ return 0;
+}
+
+int
cstore_get_var_ref(void *handle, const char *ref_str, vtw_type_e *type,
char **val, int from_active)
{
diff --git a/src/cstore/cstore-c.h b/src/cstore/cstore-c.h
index 44f1efd..9728315 100644
--- a/src/cstore/cstore-c.h
+++ b/src/cstore/cstore-c.h
@@ -28,6 +28,8 @@ int cstore_validate_tmpl_path(void *handle, const char *path_comps[],
int num_comps, int validate_tags);
int cstore_cfg_path_exists(void *handle, const char *path_comps[],
int num_comps);
+int cstore_cfg_path_exists_effective(void *handle, const char *path_comps[],
+ int num_comps);
int cstore_cfg_path_deactivated(void *handle, const char *path_comps[],
int num_comps, int in_active);