summaryrefslogtreecommitdiff
path: root/src/cstore/cstore-c.cpp
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2011-01-05 16:44:31 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2011-01-05 16:44:31 -0800
commit2208bfef1004295d3227492c6a3e9d7b36903db5 (patch)
tree87f7596ebe3eef9afb2bd8743c7de1f6b434c6eb /src/cstore/cstore-c.cpp
parent9518ae3e0cee2e6547a8658e1eb3a39fdb507081 (diff)
downloadvyatta-cfg-2208bfef1004295d3227492c6a3e9d7b36903db5.tar.gz
vyatta-cfg-2208bfef1004295d3227492c6a3e9d7b36903db5.zip
fix for bug 6641
* change shell API to only use "edit level" when needed. * add factory functions for cstore creation to simplify code.
Diffstat (limited to 'src/cstore/cstore-c.cpp')
-rw-r--r--src/cstore/cstore-c.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cstore/cstore-c.cpp b/src/cstore/cstore-c.cpp
index c835efe..292ff38 100644
--- a/src/cstore/cstore-c.cpp
+++ b/src/cstore/cstore-c.cpp
@@ -15,11 +15,12 @@
*/
#include <cstring>
+#include <cstdlib>
#include <vector>
#include <string>
+#include <cstore/cstore.hpp>
#include <cstore/cstore-c.h>
-#include <cstore/unionfs/cstore-unionfs.hpp>
static void
_get_str_vec(vector<string>& vec, const char *strs[], int num_strs)
@@ -32,14 +33,14 @@ _get_str_vec(vector<string>& vec, const char *strs[], int num_strs)
void *
cstore_init(void)
{
- Cstore *handle = new UnionfsCstore();
+ Cstore *handle = Cstore::createCstore(false);
return (void *) handle;
}
void
cstore_free(void *handle)
{
- UnionfsCstore *h = (UnionfsCstore *) handle;
+ Cstore *h = (Cstore *) handle;
delete h;
}