# HG changeset patch # User Andreas Schwab # Date 1191658668 0 # Node ID ac06b6d5fee4a87baa3bbf2fc26f1aaff6ace47e # Parent dd8aff489cf2c7e36ada597ec20cc02b27671fdf (Fwrite_region): Ignore EINVAL error from fsync. diff -r dd8aff489cf2 -r ac06b6d5fee4 src/fileio.c --- a/src/fileio.c Sat Oct 06 01:45:16 2007 +0000 +++ b/src/fileio.c Sat Oct 06 08:17:48 2007 +0000 @@ -5274,8 +5274,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