From e62a201d4da2deadf021e5bc7b80f5fc7de44c7b Mon Sep 17 00:00:00 2001 From: Balbir Singh Date: Mon, 21 Apr 2008 10:46:09 +0000 Subject: [PATCH] chown recursive routines need to return zero on success Signed-off-by: Balbir Singh git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@19 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.c b/api.c index b7a224f2..9f144a30 100644 --- a/api.c +++ b/api.c @@ -47,7 +47,7 @@ static char MOUNT_POINT[FILENAME_MAX]; static int cg_chown_file(FTS *fts, FTSENT *ent, uid_t owner, gid_t group) { - int ret = 1; + int ret = 0; const char *filename = fts->fts_path; dbg("seeing file %s\n", filename); switch (ent->fts_info) { @@ -73,7 +73,7 @@ static int cg_chown_file(FTS *fts, FTSENT *ent, uid_t owner, gid_t group) */ static int cg_chown_recursive(char **path, uid_t owner, gid_t group) { - int ret = 1; + int ret = 0; dbg("path is %s\n", *path); FTS *fts = fts_open(path, FTS_PHYSICAL | FTS_NOCHDIR | FTS_NOSTAT, NULL); @@ -84,7 +84,7 @@ static int cg_chown_recursive(char **path, uid_t owner, gid_t group) dbg("fts_read failed\n"); break; } - cg_chown_file(fts, ent, owner, group); + ret = cg_chown_file(fts, ent, owner, group); } fts_close(fts); return ret; -- 2.47.2