From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 31 Aug 2008 21:56:05 +0200 Subject: [U-Boot] [PATCH 2/6] Separate flash read and write operations In-Reply-To: References: <20080831145828.ED89124899@gemini.denx.de> <20080831185735.39E46242FF@gemini.denx.de> Message-ID: <20080831195605.DAAC5242FF@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Guennadi Liakhovetski, In message 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