Hi Balbir, On Mon, Dec 01, 2008 at 03:55:07PM +0530, Balbir Singh wrote: > * Ankita Garg <[EMAIL PROTECTED]> [2008-12-01 15:06:14]: > > > Hello, > > > > As part of the FOSS.in workout, I had worked on improving the error > > reporting of libcgroup. So, instead of displaying the error code of > > 50019, with the patch, the user would get a more meaningful error > > message. > > > > Testing done: Tried several incorrect scenarios, like, mount point not > > existing, executing parser without appropriate permissions, incorrect > > config file format, etc. > > > > Note: errno is still not thread specific. So, chances are that the > > global variable would be over-written and un-related error message might > > be printed. This is a to-do. > > > > Thoughts on the patch ? > > > > Signed-off-by: Ankita Garg <[EMAIL PROTECTED]> > > > > Index: trunk/cgconfig.c > > =================================================================== > > --- trunk.orig/cgconfig.c 2008-11-29 11:21:17.000000000 +0530 > > +++ trunk/cgconfig.c 2008-12-01 15:01:38.000000000 +0530 > > @@ -24,6 +24,78 @@ > > #include <string.h> > > #include <errno.h> > > > > 1. It should belong to api.c, to make error parsing easy for everyone > 2. It exceeds 80 columns on several occasions > 3. switch and case should be at same indent level. I'll fix all of > those and merge into api.c and in the next release export it > 4. I'll also changed change cgerror to cgroup_strerror() > 5. printf's need to be removed and converted to an error value > > I'll work on that, in case you are short on time. >
Sure, no problem. Sorry could not clean up the patch after the workout.. > > -- > Balbir -- Regards, Ankita Garg ([EMAIL PROTECTED]) Linux Technology Center IBM India Systems & Technology Labs, Bangalore, India ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
