On Mon, Jun 15, 2009 at 08:51:53PM +0530, Dhaval Giani wrote: > This API unloads the cgroupfs filesystem in memory. With this API > we can now replace service cgconfig stop with a cgconfigparser -u > > Signed-off-by: Dhaval Giani <[email protected]> > --- > include/libcgroup.h | 1 > src/config.c | 117 > +++++++++++++++++++++++++++++++++++++++++++++++++++ > src/libcgroup.map | 1 > src/tools/cgconfig.c | 7 ++- > 4 files changed, 125 insertions(+), 1 deletion(-) > > Index: libcg/src/config.c > =================================================================== > --- libcg.orig/src/config.c 2009-06-15 16:08:10.000000000 +0530 > +++ libcg/src/config.c 2009-06-15 20:39:26.000000000 +0530 > @@ -494,3 +494,150 @@ > fclose(yyin); > return error; > } > + > +int cgroup_config_unload_config(void)
This routine is very big, difficult to see if every error path is correct. It has 3 different iterators, isn't it possible to take out the inner 2 iterators into their own separate functions ? With that the error paths get simplified a bit. Regards, Bharata. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
