----- Original Message -----
> From: "Dhaval Giani" <[email protected]>
> To: "Ivana Varekova" <[email protected]>
> Cc: "Libo Chen" <[email protected]>, "Jan Safranek" 
> <[email protected]>, "Libcg Development list"
> <[email protected]>, "Li Zefan" <[email protected]>, "Huang 
> Qiang" <[email protected]>,
> "Wengmeiling" <[email protected]>, "libo chen" 
> <[email protected]>
> Sent: Thursday, September 5, 2013 2:30:29 PM
> Subject: Re: [PATCH v4 4/7] cgconfig: change function usage behavior
> 
> On Thu, Sep 5, 2013 at 2:36 AM, Ivana Varekova <[email protected]> wrote:
> 
> >
> >
> > ----- Original Message -----
> > > From: "Dhaval Giani" <[email protected]>
> > > To: "Libo Chen" <[email protected]>
> > > Cc: "Ivana Hutarova Varekova" <[email protected]>, "Jan Safranek" <
> > [email protected]>, "Libcg Development list"
> > > <[email protected]>, "Li Zefan" <[email protected]>,
> > "Huang Qiang" <[email protected]>,
> > > "Wengmeiling" <[email protected]>, "libo chen" <
> > [email protected]>
> > > Sent: Thursday, September 5, 2013 5:35:46 AM
> > > Subject: Re: [PATCH v4 4/7] cgconfig: change function usage behavior
> > >
> > > On Wed, Sep 4, 2013 at 11:29 PM, Libo Chen
> > > <[email protected]>wrote:
> > >
> > > > remove exit from function usage and add a structure like usage function
> > > > in the other tools.
> > > > This is suggested by Ivana Hutarova Varekova <[email protected]>
> > > >
> > > > now usage willn't exit, so we should help it in err case.
> > > >
> > > > v4:
> > > >  - fix some code style reported by checkpatch.pl
> > > >
> > > > Signed-off-by: Libo Chen <[email protected]>
> > > > ---
> > > >  src/tools/cgconfig.c |   61
> > > > ++++++++++++++++++++++++++++---------------------
> > > >  1 files changed, 35 insertions(+), 26 deletions(-)
> > > >
> > > > diff --git a/src/tools/cgconfig.c b/src/tools/cgconfig.c
> > > > index 900c235..6ed4c77 100644
> > > > --- a/src/tools/cgconfig.c
> > > > +++ b/src/tools/cgconfig.c
> > > > @@ -35,29 +35,34 @@
> > > >
> > > >  static struct cgroup_string_list cfg_files;
> > > >
> > > > -static void usage(char *progname)
> > > > +static void usage(int status, char *progname)
> > > >  {
> > > > -       printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\
> > > > +       if (status != 0) {
> > > > +               fprintf(stderr, "Wrong input parameters, "\
> > > > +                       "try %s -h' for more information.\n",
> > progname);
> > > >
> > >
> > > Add a return here, and you don't need the else.
> > All other tools use if .. else .. version so the present version with
> > "else" and without "return" are ok for me.
> >
> 
> Sure, but all that means is that they too need to be fixed up. The
> additional indentation does make the code look uglier, and harder to read,
> so I would much rather have it fixed up.
> 
> Thanks!
> Dhaval
> 
Ok, if yo don't have any problem with it I will merge this version and create a 
patchset which fix this stuff for all tools. Is it ok for you?
Ivana 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to