On Thu 16-06-11 08:34:44, Jan Safranek wrote: > The cg_chmod_recursive_controller function always returned nozero error > code, even when everything goes well.
The changelog sounds a bit obscure. It took me a while to understand why. What about something like: " fts_read can return NULL in two cases. Either when we have visited all files in the hierarchy (when errno is set to 0) or when an error occured. We shouldn't set an error code in the first case obviously. " Btw. the patch would still print out failure if debugging is on. > > Signed-off-by: Jan Safranek <jsafr...@redhat.com> > --- > > src/api.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/api.c b/src/api.c > index 66cc2b3..098d2e3 100644 > --- a/src/api.c > +++ b/src/api.c > @@ -267,8 +267,10 @@ static int cg_chmod_recursive_controller(char *path, > mode_t dir_mode, > ent = fts_read(fts); > if (!ent) { > cgroup_dbg("fts_read failed\n"); > - last_errno = errno; > - final_ret = ECGOTHER; > + if (errno != 0) { > + last_errno = errno; > + final_ret = ECGOTHER; > + } > break; > } > ret = cg_chmod_file(fts, ent, dir_mode, dirm_change, > -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel