diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-11 20:47:02 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-11 20:47:02 -0700 |
commit | b04d003bd7fe306819ddcad8398f62d6f71edb9d (patch) | |
tree | d724a945feed76700b6b3feaae5b5c545e36d4cb | |
parent | e80e6a01a6396679e5293ec0b8b41c8c7378ea48 (diff) | |
download | vyatta-cfg-b04d003bd7fe306819ddcad8398f62d6f71edb9d.tar.gz vyatta-cfg-b04d003bd7fe306819ddcad8398f62d6f71edb9d.zip |
Fix compiler warnings in unionfs
Remove unused variables
Remove extra arg from sprintf
Fix missing prototype for piecewise_copy.
-rw-r--r-- | src/common/unionfs.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/common/unionfs.c b/src/common/unionfs.c index 7c29ad1..5e90c0c 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -43,6 +43,9 @@ copy_func(GNode *node, gpointer data); static gboolean delete_func(GNode *node, gpointer data); +static void +piecewise_copy(GNode *root_node, boolean test_mode); + /** * * @@ -528,14 +531,6 @@ common_commit_copy_to_live_config(GNode *node, boolean test_mode) static const char format1[]="cp -r -f %s/* %s"; /*mdirp, tmpp*/ static const char format2[]="sudo umount %s"; //mdirp - - static const char format4[]="rm -rf %s/{.*,*} >&/dev/null ; /bin/true"; /*cdirp*/ - - //walk up tree until diverge or skip - static const char format6[]="cp -rf %s/* -t %s";/*tmpp, adirp*/ - - static const char format7[]="rm -fr %s >&/dev/null ; /bin/true"; /*tmpp*/ - static const char format8[]="sudo mount -t unionfs -o dirs=%s=rw:%s=ro unionfs %s"; //cdirp, adirp, mdirp set_echo(TRUE); @@ -991,7 +986,7 @@ struct SrcDst { /** * **/ -void +static void piecewise_copy(GNode *root_node, boolean test_mode) { struct SrcDst sd; @@ -1046,7 +1041,7 @@ copy_func(GNode *node, gpointer data) //this is for the case where it is set by default, then unset at the node--i.e. no longer a default value. if (((struct VyattaNode*)(node->data))->_config._multi == FALSE) { //only for leaf char *parent_path = ((struct VyattaNode*)(node->parent->data))->_data._path; - sprintf(command,clear_def,sd->_dst,parent_path,sd->_dst,parent_path); + sprintf(command,clear_def,sd->_dst,parent_path); if (g_debug) { printf("%s\n",command); fflush(NULL); |