diff options
author | slioch <slioch@eng-140.vyatta.com> | 2009-06-09 20:15:00 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2009-06-09 20:17:25 -0700 |
commit | 7fee20a430a05b934b00d025bccb4281792ccb3d (patch) | |
tree | d9aa99a8981e1ea280a546f066fc2c7122aea30b /src | |
parent | 6d762889ffa523806830795b5d1634475f9d14b0 (diff) | |
download | vyatta-cfg-7fee20a430a05b934b00d025bccb4281792ccb3d.tar.gz vyatta-cfg-7fee20a430a05b934b00d025bccb4281792ccb3d.zip |
additional fix for bug 4212. root dirs needed to be reversed on del event. passes regression
Diffstat (limited to 'src')
-rw-r--r-- | src/common/unionfs.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/common/unionfs.c b/src/common/unionfs.c index 24ff28f..80a9ba7 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -115,18 +115,6 @@ get_config_path(GNode *node) return buf; } - -/** - * Recurse from node identified as deleted - **/ -void -retrieve_delete_data(char* rel_data_path, GNode *node) -{ - //switch root - - return; -} - /** * **/ @@ -336,7 +324,12 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) GNode *new_node = g_node_new(vn); // new_node = g_node_insert(node, -1, new_node); new_node = insert_sibling_in_order(node,new_node); - retrieve_data(new_data_path,new_node,root,vn->_data._operation); + if (op == K_DEL_OP) { + retrieve_data(new_data_path,new_node,get_adirp(),vn->_data._operation); + } + else { + retrieve_data(new_data_path,new_node,root,vn->_data._operation); + } } } } @@ -384,7 +377,7 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) new_node = insert_sibling_in_order(node,new_node); char new_data_path[MAX_LENGTH_DIR_PATH]; sprintf(new_data_path,"%s/%s",rel_data_path,dirp_wo->d_name); - retrieve_data(new_data_path,new_node,root,K_DEL_OP); + retrieve_data(new_data_path,new_node,get_adirp(),K_DEL_OP); } } closedir(dp_wo); |