[U-Boot] [PATCH 2/6] Separate flash read and write operations

Wolfgang Denk wd at denx.de
Sun Aug 31 21:56:05 CEST 2008


Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0808312139100.6742 at axis700.grange> you wrote:
> 
> Yes, the original code was:
...
> int flash_io(int mode)
> {
> 	fd = open(path, mode);
> 
> 	if (mode == O_RDONLY) {

That's not true. You intentionally omit the error handling part here.

> 	close(fd);
> }

Ditto.

> yes, I thus duplicate "open" and "close". We could do

...and all of the error handling.

> but, honestly, I prefer my version. If you disagree, I can change it to 
> variant 3, no problem. This will mean redoing all patches 2-6 though...

Indeed, I disagree. Didn't I write that before?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If something is different, it's either better or worse,  and  usually
both.                                                    - Larry Wall


More information about the U-Boot mailing list