[SMS D-Bus 04/23] write_file: make transaction-safe

Denis Kenzior denkenz at gmail.com
Fri Jul 2 13:39:27 PDT 2010


Hi Inaky,

On 06/25/2010 06:15 PM, Inaky Perez-Gonzalez wrote:
> From: Inaky Perez-Gonzalez <inaky.perez-gonzalez at intel.com>
> 
> write_file(), as written wasn't transaction-safe; a crash bewtween a
> file being open and the buffer being written before a safe close would
> leave the file with a set of undetermined contents.
> 
> Modified to the file is written to a temporary file name; once
> completed, it is renamed to the final name. This way, a crash in the
> middle doesn't leave half-baked files.

Patch is fine, but:

Applying: write_file: make transaction-safe
/home/denkenz/ofono-master/.git/rebase-apply/patch:13: trailing whitespace.
/*
/home/denkenz/ofono-master/.git/rebase-apply/patch:22: trailing whitespace.
 */
/home/denkenz/ofono-master/.git/rebase-apply/patch:75: trailing whitespace.
	g_free(tmp_path);		
fatal: 3 lines add whitespace errors.

Regards,
-Denis


More information about the ofono mailing list