From: Wolfgang Denk Date: Tue, 21 May 2013 14:47:23 +0200 Subject: [U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored In-Reply-To: <1369078482-5863-1-git-send-email-mhei@heimpold.de> References: <1369078482-5863-1-git-send-email-mhei@heimpold.de> Message-ID: <20130521124723.D2F42384809@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 Michael Heimpold, In message <1369078482-5863-1-git-send-email-mhei@heimpold.de> you wrote: > Closing a file descriptor does not guarantee that the data has been > successfully saved to disk, as the kernel might defer the write. What is the exact problem you are trying to fix? I mean, when exactly does adding the sync play a role? 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 Old programmers never die, they just branch to a new address.