AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Ed.Kwan@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	2B044E14371DA244B71F8BF2514563F53B90EF10@cosmail03.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Fri, 29 Jan 2010 18:25:05 -0800
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Kwan, Ed" <Ed.Kwan@lsi.com>
Subject: Re: please review code change for TED 27764 Change ICW to require
 local date and time, and optionally ask for NTP server
Message-ID: <20100129182505.72151a54@ripper.onstor.net>
In-Reply-To: <2B044E14371DA244B71F8BF2514563F53B90EF10@cosmail03.lsi.com>
References: <2B044E14371DA244B71F8BF2514563F53B90EEB6@cosmail03.lsi.com>
	<20100129150244.40644fe5@ripper.onstor.net>
	<2B044E14371DA244B71F8BF2514563F53B90EF10@cosmail03.lsi.com>
Organization: LSI
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

On Fri, 29 Jan 2010 18:03:37 -0700 "Kwan, Ed" <Ed.Kwan@lsi.com> wrote:

> Comments inline
> 
> -----Original Message-----
> From: Andrew Sharp [mailto:andy.sharp@lsi.com] 
> Sent: Friday, January 29, 2010 3:03 PM
> To: Kwan, Ed
> Subject: Re: please review code change for TED 27764 Change ICW to
> require local date and time, and optionally ask for NTP server
> 
> On Fri, 29 Jan 2010 15:28:52 -0700 "Kwan, Ed" <Ed.Kwan@lsi.com> wrote:
> 
> > Change 34314
> > 
> > I will change the WebUI for ICW in a different change number.
> 
> oops, resending...
> 
> 
> = Change 34314 by edk@edk-dev on 2010/01/29 14:27:11 *pending*
> = 
> = 	For TED 27764 Change ICW to require local date and time,
> and optionally ask for NTP server = 	Do not prompt for NTP
> servers in the ICW.  Instead, use the defaults NTP servers listed in
> = 	the new /etc/onstor/ntp.default. = 	Modify "system
> time ntp server" to accept hostname in addition to IP address. =
> 	Rename "system time ntp disable" to "system time ntp reset
> [-d]". = 	Add new command "system time show ntpservers". =
> 	Reviewed by ?? = 
> 
> nfx-tree/code/sm-sct/Makefile
> 
>      looks good
> 
> nfx-tree/code/ssc-initial-config/initial-config.c
> 
>      looks good
> 
> nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_ntp.txt
> 
>      line 3, i think you still have to have the disable-like
>      functionality, because there are scenarios where disabling is
>      desired to keep the system from behaving badly.
> 
> [EDK] The old "disable" command is equivalent to "reset -d".  The old
> "disable" command doesn't disable ntp, just delete the ntp servers.


OK


> 
> nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_ntp_reset.txt
> 
>      >>add
>      nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_ntp_reset.txt
> 
>      line 11 tws
> 
> [EDK] fixed.
> 
> nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_ntp_server.txt
> 
>      looks good
> 
> nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_show_ntpservers.txt
> 
>      >>add
>      nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_show_ntpservers.txt
> 
>      line 12, s/list/lists/
> 
> [EDK] fixed typo.
> 
> 
> nfx-tree/code/ssc-nfxsh/cmd_system.c
> 
>      line 2203, there is no option that take a parameter, this is
>      bogus, besides, it's bogus anyway.  ':' is part of the string
>      sent to getopt, not part of the command syntax in any special
> way.
> 
> [EDK] Yes, you are correct that there are no optional parameters.
> But does this hurt?  If someone wants to add an option that takes a
> parameter, the code is there already.  I'll remove it if you want.

What I mean is, it's looking for ':' which won't ever come up in the
input string unless the user types something goofy like
"ntp server reset -d :" or something weird like that, ie., a typo, and
there's code in there to catch that.  Do you agree?  That's what the
code looked like to me.  I'm working from memory now ~:^(


> 
>      the -d flag makes no sense.  correction, line 2214, the logic
>      is reversed.
> 
> [EDK] The "-d" flag deletes all ntp servers, including the default
> ones.  Otherwise, it just deletes the non-default ones added by the
> Sys Admin and revert to the factory defaults.  Why is the logic
> reversed?

It looked like to me that the -d means "debug" and means don't actually
do anything.  Again, working from memory.  If (dflag) then output
warning prompt, otherwise don't output warning prompt.  Then later, if
(!dflag) then reset_cfg() otherwise do nothing meaningful.  So I was
thinking the -d flag meant "psych! don't actually do it" and the logic
on the warning prompt should have also been if (!dflag)

Sorry I'm working from memory...

>      line 2257 put some spaces around your operators, man!
> 
> [EDK] Done
> 
>      line 2263, put parens around the ?: thingie to make it clear how
>      to interpret the ',' (comma)
> 
> [EDK] Done
> 
> 
> 
> nfx-tree/code/ssc-nfxsh/linux.h
> 
>      line 22 doesn't line up for me (rule: tabs to indent, spaces
>      to separate)
> 
> [EDK] Done
> 
> nfx-tree/code/ssc-nfxsh/openbsd.h
> 
>      looks good
> 
> nfx-tree/code/ssc-nfxsh/vtysh_initial.c
> 
>      line 783-866 indentation is broken even more than it was before
> 
> [EDK] I didn't change the indentation.
> 
> nfx-tree/code/ssc-timekeeper/Makefile
> 
>      looks good
> 
> nfx-tree/code/ssc-timekeeper/ntp.default
> 
>      >>add nfx-tree/code/ssc-timekeeper/ntp.default
> 
>      i'm just not even looking at this, i'm sick of it, and it's
> broken in my opinion, so yeah, go ahead.  yee scurvy dogs.
> 
> nfx-tree/code/ssc-timekeeper/ntp_utils.c
> 
>      line 551 why'ze it still here?  is it handy for debugging?
> 
> [EDK] Deleted now.
> 
> nfx-tree/code/ssc-timekeeper/timekeep-api.h
> 
>      looks good
> 
> nfx-tree/code/ssc-webui/WebHelp/Clearing_or_Disabling_an_NTP_Server.htm
> 
>      looks good
> 
> nfx-tree/code/ssc-webui/WebHelp_source/Clearing_or_Disabling_an_NTP_Server.htm
> 
>      consider this the same for both files
> 
> 
>      line 41, what does "Both prompt a confirmation message." mean?
> 
> [EDK] You just need to click "Yes" to proceed. I removed the above
> sentence in the help page.  
> 
>      As long as we're hard coding the default servers, we might as
>      well list them in this message so the admin can decide if that's
>      the right option for him or her.
> 
> nfx-tree/code/ssc-webui/js/ntp/edit.js
> 
>      this could all be OK, i don't know...sure check it in
> 
> nfx-tree/code/ssc-webui/js/ntp/json.js
> 
>      looks good
> 
