[maemo-commits] [maemo-commits] r17831 - in projects/haf/trunk/glib: . glib
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Mar 27 12:21:35 EET 2009
- Previous message: [maemo-commits] r17830 - projects/haf/tags/gtk+/2.12.12-1maemo12/debian
- Next message: [maemo-commits] r17832 - in projects/haf/trunk/clutter0.8: clutter/cogl/common clutter/eglx debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: timj Date: 2009-03-27 12:21:33 +0200 (Fri, 27 Mar 2009) New Revision: 17831 Modified: projects/haf/trunk/glib/ChangeLog projects/haf/trunk/glib/glib/gfileutils.c Log: 2009-03-27 11:14:15 Tim Janik <timj at lanedo.com> * glib/gfileutils.c (write_to_temp_file): issue fdatasync() before closing the file to work around file systems with writeback behaviour. Modified: projects/haf/trunk/glib/ChangeLog =================================================================== --- projects/haf/trunk/glib/ChangeLog 2009-03-27 09:56:39 UTC (rev 17830) +++ projects/haf/trunk/glib/ChangeLog 2009-03-27 10:21:33 UTC (rev 17831) @@ -1,3 +1,8 @@ +2009-03-27 11:14:15 Tim Janik <timj at lanedo.com> + + * glib/gfileutils.c (write_to_temp_file): issue fdatasync() before + closing the file to work around file systems with writeback behaviour. + 2009-03-12 Claudio Saavedra <csaavedra at igalia.com> * debian/changelog: Update for 2.18.1-1maemo3 Modified: projects/haf/trunk/glib/glib/gfileutils.c =================================================================== --- projects/haf/trunk/glib/glib/gfileutils.c 2009-03-27 09:56:39 UTC (rev 17830) +++ projects/haf/trunk/glib/glib/gfileutils.c 2009-03-27 10:21:33 UTC (rev 17831) @@ -995,7 +995,14 @@ } errno = 0; +#ifdef MAEMO_CHANGES + /* introduce a write-barrier for file contents before close()/rename() + * to work around file systems with writeback behaviour like UBIFS. + */ + if (fdatasync (fileno (file)) < 0 || fclose (file) == EOF) +#else /* !MAEMO_CHANGES */ if (fclose (file) == EOF) +#endif /* MAEMO_CHANGES */ { save_errno = 0;
- Previous message: [maemo-commits] r17830 - projects/haf/tags/gtk+/2.12.12-1maemo12/debian
- Next message: [maemo-commits] r17832 - in projects/haf/trunk/clutter0.8: clutter/cogl/common clutter/eglx debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]