# HG changeset patch # User Andreas Schwab # Date 1191658509 0 # Node ID 5b8f5c8e3e4be80723ce47bbbfe48aa22749ab56 # Parent f7a1ed49fd9f87d4040d688f57d3cba01a729dde (Fwrite_region): Ignore EINVAL error from fsync. diff -r f7a1ed49fd9f -r 5b8f5c8e3e4b src/fileio.c --- a/src/fileio.c Sat Oct 06 01:52:18 2007 +0000 +++ b/src/fileio.c Sat Oct 06 08:15:09 2007 +0000 @@ -5359,8 +5359,10 @@ it, and that means the fsync here is not crucial for autosave files. */ if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0) { - /* If fsync fails with EINTR, don't treat that as serious. */ - if (errno != EINTR) + /* If fsync fails with EINTR, don't treat that as serious. Also + ignore EINVAL which happens when fsync is not supported on this + file. */ + if (errno != EINTR && errno != EINVAL) failure = 1, save_errno = errno; } #endif