summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-05-28 15:23:08 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-05-28 15:23:08 -0700
commit51b4ed5a4a26591d3449c09a31edb8ba53b322da (patch)
tree23b4f7e6f71b71be4c40de3287b1804ea61b6698
parent5fcbd648e8c8c13f5b9db135d433db6a6bda5047 (diff)
parent7e460b62054a56e6f1271925daf79177f6758c4c (diff)
downloadvyatta-cfg-51b4ed5a4a26591d3449c09a31edb8ba53b322da.tar.gz
vyatta-cfg-51b4ed5a4a26591d3449c09a31edb8ba53b322da.zip
Merge branch 'larkspur' of git.vyatta.com:/git/vyatta-cfg into larkspur
-rw-r--r--src/cli_new.c4
-rw-r--r--src/common/unionfs.c13
2 files changed, 8 insertions, 9 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index b2d6e1d..bfd2d8c 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -929,7 +929,7 @@ boolean val_cmp(const valstruct *left, const valstruct *right, vtw_cond_e cond)
//don't bother comparing if these are different types.
if ((rcur || right->cnt)
- && right->val_types[rcur] != NULL) {
+ && right->val_types[rcur] != ERROR_TYPE) {
if (right->val_types[rcur] != val_type) {
continue;
}
@@ -957,7 +957,7 @@ boolean val_cmp(const valstruct *left, const valstruct *right, vtw_cond_e cond)
left_parts+5);
if ((rcur || right->cnt)
- && right->val_types[rcur] != NULL) {
+ && right->val_types[rcur] != ERROR_TYPE) {
format = cond_formats[right->val_types[rcur]];
}
(void) sscanf(rval, format, right_parts, right_parts+1,
diff --git a/src/common/unionfs.c b/src/common/unionfs.c
index 2f7cd70..2c4f0f4 100644
--- a/src/common/unionfs.c
+++ b/src/common/unionfs.c
@@ -53,9 +53,6 @@ sys_cp(const char *src_file, const char *dst_file)
}
void
-retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op);
-
-void
set_path(char *path, boolean config);
struct VyattaNode*
@@ -151,7 +148,8 @@ get_config_path(GNode *node)
*
**/
void
-retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op)
+retrieve_data(char* rel_data_path, GNode *node, const char* root,
+ NODE_OPERATION op)
{
boolean final_node = FALSE;
@@ -159,8 +157,9 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op)
return;
}
- char *tmp = root;//get_cdirp();
+ const char *tmp = root;//get_cdirp();
char full_data_path[sizeof(char)*MAX_LENGTH_DIR_PATH];
+
strcpy(full_data_path,tmp);
if (rel_data_path != NULL) {
strcat(full_data_path,rel_data_path);
@@ -800,8 +799,8 @@ common_commit_copy_to_live_config(GNode *node, boolean suppress_piecewise_copy,
//needed for iteration below
struct SrcDst {
- char *_src;
- char *_dst;
+ const char *_src;
+ const char *_dst;
boolean _test_mode;
};