AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20080416100334.10f799e7@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<sripal.surendiran@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	48062648.9050707@onstor.com
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 16 Apr 2008 10:04:40 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: Sripal <sripal.surendiran@onstor.com>
Subject: Re: Code review
Message-ID: <20080416100440.33c0f574@ripper.onstor.net>
In-Reply-To: <48062648.9050707@onstor.com>
References: <47EBCBD2.1080809@onstor.com>
	<47EDF81C.50805@onstor.com>
	<20080330043233.01730b94@ripper.onstor.net>
	<47F3BA97.8060503@onstor.com>
	<20080402135304.1b4b2249@ripper.onstor.net>
	<47F69671.1090307@onstor.com>
	<47FCEE2D.6010104@onstor.com>
	<20080409100812.7124e0b0@ripper.onstor.net>
	<48062648.9050707@onstor.com>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Fix a couple minor nits and go ahead and check it in, but also update
the checkin comment to more accurately describe the change.  Something
like "made timezone setting/displaying portable" etc., you get the idea.

Thanks.

a

nfx-tree/code/ssc-genlib/genlib-linux.c



     line 183, fix spelling of character



nfx-tree/code/ssc-genlib/genlib-openbsd.c



     line 194,222 trailing whitespace


nfx-tree/code/ssc-genlib/genlib.h


     looks good


nfx-tree/code/ssc-nfxsh/cmd_system-linux.c



     looks good



nfx-tree/code/ssc-nfxsh/cmd_system-openbsd.c



     looks good



nfx-tree/code/ssc-nfxsh/cmd_system.c



     looks good





On Wed, 16 Apr 2008 21:46:08 +0530 Sripal
<sripal.surendiran@onstor.com> wrote:

> Hi Andy,
> 
>  I have incorporated your review comments. See my inline comments.
> 
> Thanks,
> Sripal.
> 
> Andrew Sharp wrote:
> > Please compile this code on both Linux and BSD builds, and test it
> > before checking it in.  It's obvious it doesn't compile now.
> > SRIPAL> Compiled and tested the code.
> >
> > nfx-tree/code/ssc-genlib/genlib-linux.c
> >
> >
> >      line 168, you don't want to return EINVAL here?
> > SRIPAL> Done. Changed from -1 to EINVAL
> >
> > nfx-tree/code/ssc-genlib/genlib-openbsd.c
> >
> >
> >      line 164 typo
> > SRIPAL> Modified
> >   
> >      line 170, this code isn't too robust if the initial path isn't
> >      /usr/share/zoneinfo.  fix it to just use the last component of
> >      the path.
> > SRIPAL> Done
> >      line 199, please no spaces after open paren in function calls.
> >      please don't use backslashes in strings, instead use compiler's
> >      ability to concatenate strings.
> > SRIPAL>Done
> >   
> > nfx-tree/code/ssc-genlib/genlib.h
> >
> >      looks good
> >
> > nfx-tree/code/ssc-initial-config/initial-config.c
> >
> >
> >      line 1112, uh, does this look right to you?  should look more
> > like:
> >
> >      "Unable to update the timezone: %s\n", strerror(retval));
> > SRIPAL>I did blunder mistake here. Rectified.
> >
> > nfx-tree/code/ssc-nfxsh/cmd_system-linux.c
> >
> >
> >      looks good
> >
> >
> > nfx-tree/code/ssc-nfxsh/cmd_system-openbsd.c
> >
> >
> >      looks good
> >
> >
> > nfx-tree/code/ssc-nfxsh/cmd_system.c
> >
> >
> >      looks good
> >
> >
> >
> >
> > On Wed, 09 Apr 2008 21:56:21 +0530 Sripal
> > <sripal.surendiran@onstor.com> wrote:
> >
> >   
> >> Gentle Reminder ......
> >>
> >> Sripal wrote:
> >>     
> >>> Andy,
> >>>
> >>> See my comments below.
> >>>
> >>> Andrew Sharp wrote:
> >>>       
> >>>> nfx-tree/code/ssc-genlib/genlib-linux.c
> >>>>
> >>>>      line 26,27 neither of these is needed
> >>>> Sripal> "fs-api.h"  is needed for do_system.
> >>>>
> >>>>      line 168, 223, no reason i can see not to return a possibly
> >>>>      meaningful value, like EINVAL
> >>>>
> >>>>   
> >>>>         
> >>> Sripal>Done
> >>>
> >>>       
> >>>>      line 217, 229, 240, 243,  no reason not to return errno here
> >>>>   
> >>>>         
> >>> Sripal>Done
> >>>       
> >>>> nfx-tree/code/ssc-genlib/genlib-openbsd.c
> >>>>
> >>>>      fix up return values to be the same/similar as -linux.c
> >>>> file. 
> >>>>         
> >>> Sripal>Done.
> >>>       
> >>>>      line 27, include not needed - remove
> >>>>   
> >>>>         
> >>> Sripal> "fs-api.h" is needed for do_system.
> >>>       
> >>>> nfx-tree/code/ssc-genlib/genlib.h
> >>>>
> >>>>      mention in the descriptions of the routines that they return
> >>>> errno on failure.
> >>>> Sripal> Done
> >>>> nfx-tree/code/ssc-initial-config/initial-config.c
> >>>>
> >>>>      line 1103, mention something about the error, possibly
> >>>>      using strerror() to give you ascii version of errno.
> >>>>
> >>>>      "Unable to update the timezone: %s\n", strerror(rc));
> >>>> Sripal> Done
> >>>>
> >>>>      line 1906, 1911, these would seem to be an unrelated change
> >>>> that possibly belongs in a different changelist?
> >>>> Sripal> Done
> >>>>
> >>>> nfx-tree/code/ssc-nfxsh/cmd_system-linux.c
> >>>>
> >>>>      looks good
> >>>>
> >>>> nfx-tree/code/ssc-nfxsh/cmd_system-openbsd.c
> >>>>
> >>>>      looks good
> >>>>
> >>>> nfx-tree/code/ssc-nfxsh/cmd_system.c
> >>>>
> >>>>      looks good
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> Change 28626 by perforce@sripal-rdev on 2008/04/02 08:33:05
> >>>> *pending*
> >>>>
> >>>>         TED00022994 - Timezone entered in FTI does not show up in
> >>>> cli commands.
> >>>>         Modified Initial configuration to update the Linux
> >>>> specific timezone configuration file.
> >>>>
> >>>> Affected files ...
> >>>>
> >>>> ... //depot/dev/nfx-tree/code/ssc-genlib/genlib-linux.c#5 edit
> >>>> ... //depot/dev/nfx-tree/code/ssc-genlib/genlib-openbsd.c#5 edit
> >>>> ... //depot/dev/nfx-tree/code/ssc-genlib/genlib.h#5 edit
> >>>> ... //depot/dev/nfx-tree/code/ssc-initial-config/initial-config.c#7
> >>>> edit ... //depot/dev/nfx-tree/code/ssc-nfxsh/cmd_system-linux.c#9
> >>>> edit ... //depot/dev/nfx-tree/code/ssc-nfxsh/cmd_system-openbsd.c#9
> >>>> edit ... //depot/dev/nfx-tree/code/ssc-nfxsh/cmd_system.c#44 edit
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Wed, 02 Apr 2008 22:25:51 +0530 Sripal
> >>>> <sripal.surendiran@onstor.com> wrote:
> >>>>
> >>>>   
> >>>>         
> >>>>> Andy,
> >>>>>
> >>>>> Since FTI code is merged to dev branch, I moved my changes to
> >>>>> dev branch.
> >>>>>
> >>>>> New change id: 28626
> >>>>>
> >>>>> Also see my inline comments below
> >>>>>
> >>>>> Thanks,
> >>>>> Sripal.
> >>>>>
> >>>>> Andrew Sharp wrote:
> >>>>>     
> >>>>>           
> >>>>>> Aha, I reviewed it but then thought I would have someone else
> >>>>>> look at it too, but then forgot to tell that person.  My bad.
> >>>>>>
> >>>>>> Anyway, I thought about it some more and I think my review is
> >>>>>> good enough.  Here it is:
> >>>>>>
> >>>>>>
> >>>>>> nfx-tree/code/ssc-genlib/genlib-linux.c
> >>>>>>
> >>>>>>
> >>>>>>      looks ok, but why are these in genlib?  are they cli used
> >>>>>> only functions?  if so, they can go in ssc-nfxsh/cmd_system*.c
> >>>>>> or something like that.  hmm, i'm thinking you used them in
> >>>>>>      initial-config as well.
> >>>>>> Sripal>>You are correct.
> >>>>>>
> >>>>>> nfx-tree/code/ssc-genlib/genlib-openbsd.c
> >>>>>>
> >>>>>>
> >>>>>>      line 196, instead of all this snprintf stuff, can you use
> >>>>>>      do_system()?
> >>>>>> Sripal>>Done
> >>>>>>
> >>>>>> nfx-tree/code/ssc-genlib/genlib.h
> >>>>>>
> >>>>>>
> >>>>>>      line 136,158, even though someone has been violating this,
> >>>>>>      function declarations should be all one line with their
> >>>>>> type:
> >>>>>>
> >>>>>>      int foo(args);
> >>>>>>
> >>>>>>      as opposed to
> >>>>>>
> >>>>>>      int
> >>>>>>      foo(args);
> >>>>>>
> >>>>>>      whereas function definitions should be the opposite.
> >>>>>> Sripal>>Done
> >>>>>>
> >>>>>> nfx-tree/code/ssc-initial-config/initial-config.c
> >>>>>>
> >>>>>>
> >>>>>>      line 282, it seems like this removed routine,
> >>>>>>      initconf_modifyTimeZone should work fine for Linux as well
> >>>>>> as BSD? if so, then the other functions can be moved into
> >>>>>> libnfxsh?
> >>>>>> Sripal>>No. In openbsd, we link /etc/localtime to actual time
> >>>>>> Sripal>>zone file in /usr/share/zoneinfo/. But in Linux, we
> >>>>>> Sripal>>copy the actual time zone file to /etc/localtime. We
> >>>>>> Sripal>>also enter the zone name to /etc/timezone file. This
> >>>>>> Sripal>>difference has actually created bug in FTI.
> >>>>>>
> >>>>>> nfx-tree/code/ssc-nfxsh/cmd_system-linux.c
> >>>>>>
> >>>>>>
> >>>>>>      ok
> >>>>>>
> >>>>>>
> >>>>>> nfx-tree/code/ssc-nfxsh/cmd_system-openbsd.c
> >>>>>>
> >>>>>>
> >>>>>>      ok
> >>>>>>
> >>>>>>
> >>>>>> nfx-tree/code/ssc-nfxsh/cmd_system.c
> >>>>>>
> >>>>>>
> >>>>>>      looks good
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Sat, 29 Mar 2008 13:34:44 +0530 Sripal
> >>>>>> <sripal.surendiran@onstor.com> wrote:
> >>>>>>
> >>>>>>   
> >>>>>>       
> >>>>>>             
> >>>>>>> Gentle reminder.....
> >>>>>>>
> >>>>>>> -Sripal.
> >>>>>>>
> >>>>>>> Sripal wrote:
> >>>>>>>     
> >>>>>>>         
> >>>>>>>               
> >>>>>>>> Andy,
> >>>>>>>>
> >>>>>>>> I have made changes to genlib files as a part of fixing bug 
> >>>>>>>> TED00022994 (Timezone entered in FTI does not show up in cli 
> >>>>>>>> commands). Request you review the modified files.
> >>>>>>>>
> >>>>>>>> Change id : 28533
> >>>>>>>>
> >>>>>>>> Thanks,
> >>>>>>>> Sripal.
> >>>>>>>>
> >>>>>>>>       
> >>>>>>>>           
> >>>>>>>>                 
> 
