AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<maxim.kozlovsky@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	BB375AF679D4A34E9CA8DFA650E2B04E03086106@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 27 Mar 2007 16:19:26 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
Subject: Re: code review for CF upgrades
Message-ID: <20070327161926.40765648@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E03086106@onstor-exch02.onstor.net>
References: <20070327114052.1af1c812@ripper.onstor.net>
	<BB375AF679D4A34E9CA8DFA650E2B04E03086106@onstor-exch02.onstor.net>
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

On Tue, 27 Mar 2007 13:56:36 -0700 "Maxim Kozlovsky"
<maxim.kozlovsky@onstor.com> wrote:

> Make sure you run this as non-root user, it is hard to track if you
> have become_root()/unbecome_root() in all the right places.
>
> 22: mkpath was literally copied from some bsd utility, hence the
> copyright.

pfft, alright

> 97: comment the global variable

done.

> 122: use the common comment format in (at least) the new routines, see
> sm-cifs/ for examples.

done.

> 152, 306: Use ensure_fs_writable()/restore_fs_permissions() instead of
> assuming the fs mounted readonly

I'm not assuming anything, I'm assuring it's mounted rw

> 199: why swap should be 6%?

You may choose:
	a) because I said so
	b) why not?
	c) you had your chance to ask that question in the review
meeting d) all of the above

> 476: Does not unmount on failure

done.

> 576: Should make sure that /mnt1 exists, since the code below does not
> handle the intermediate components of the path missing.

Not necessary. /mnt1, or secondary_mount, is always the first one
through.

> 766: Ignoring the error but still printing the error message. This can
> be confusing.

Not sure what you think it should do.  Or which line you were talking
about.  The "error?"failed" ... thing?  Depending on layout, the device
may or may not be there.  So all it says is 'failed' which no one will
notice probably.  Hmm, I'll try to fix it up a bit.

> 971: could you change the order, there is a block of code down couple
> of line which does !error check. This caused a brain lock for few
> moments while trying to look at both fragments together.

do_copy_init() ??  looks perfectly simple and straightforward.  i'll
hack it a tiny bit.  done.

> 980: Check for error?

done.

>
>
> -----Original Message-----
> From: Andy Sharp
> Sent: Tuesday, March 27, 2007 11:41 AM
> To: Maxim Kozlovsky
> Subject: code review for CF upgrades
>
> Hi Max,
>
> Please review the file nfx-tree/code/ssc-nfxsh/cmd_flash.c from
> perforce changelist 23271 on client `ripper'.  Larry is reviewing the
> rest of the files, so you don't need to review the others from the
> changelist, but hey you can if you want ~:^)
>
> Thanks,
>
> a
