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). Next, can you change the message to match something similar to what an invalid option to "ls" would spew out. 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. Then, inside default, we don't need any code after usage(), (since usage exits), so that can be cleaned up. Can you send separate patches for each one of these issues? 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