On Wed, Aug 14, 2013 at 3:18 AM, Libo Chen <clbchenlibo.c...@huawei.com> wrote: > On 2013/8/14 11:24, Dhaval Giani wrote: >> Hi! >> >> On Tue, Aug 13, 2013 at 10:39 PM, Libo Chen <clbchenlibo.c...@huawei.com> >> wrote: >>> On 2013/8/14 4:37, Dhaval Giani wrote: >>>> On Tue, Aug 6, 2013 at 3:15 AM, Libo Chen <clbchenlibo.c...@huawei.com> >>>> wrote: >>>>> >>>>> we should check invalite parameter, and then print a warning >>>>> >>>>> Signed-off-by: Libo Chen <clbchenlibo.c...@huawei.com> >>>> >>>> I'm not sure this extra warning is needed. In most unix software, if >>>> you use an invalid argument, the help is printed, which is exactly >>>> what happens here. >>>> >>>> Thanks! >>>> Dhaval >>>> >>> >>> Hi Dhaval, >>> >>> Thanks for your attention! Let me explain the scene. >>> >>> before patch: >>> run command "cgconfigparser x". 'x' is invalid argument, but no >>> tips and no help info! >>> >>> >>> But I think tip is needed! >>> >>> after patch: >>> "cgconfigparser: wrong arguments (x)" will be threw out! >> >> grrr. So my brain is not working right now. However some things to be >> kept in mind, >> >> usage() exits. So if you want to print that message, you probably want >> to be printing before usage (for one). > > Now, run command "cgconfigparser x", there is no info spew out include > usage(). > so I add "cgconfigparser: wrong arguments (x)" tip. > >> >> Next, can you change the message to match something similar to what an >> invalid option to "ls" would spew out. > > I refer the command cgcreate, but maybe we can use usage() instead only? >
$ ls -y ls: illegal option -- y usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...] I would like something like this. > >> Finally, a quick read through that code, and I can see quite a few >> things that need to be changed/corrected. We are freeing up >> default_cgroup even it has not be allocated. That needs to be >> corrected. >> > > Don`t worry. cgroup_free() is safe even if default_group is NULL. > While true, there is no need to make the call if not required. So yes, it is a cleanup I would like :-). Thanks! Dhaval ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel