]> git.pond.sub.org Git - empserver/commitdiff
(gen_power) [!_WIN32]: Previous revision inserted fsync(), where
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 24 Aug 2007 17:22:12 +0000 (17:22 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 24 Aug 2007 17:22:12 +0000 (17:22 +0000)
previously something equivalent was done only for _WIN32.  Revert
that.

src/lib/commands/powe.c

index a66065f323b79bfc3edea40e50a79895b9d41833..eb808f2bc79ea3a9c786eed9275a615930e38211 100644 (file)
@@ -314,13 +314,14 @@ gen_power(struct powstr *powbuf, int save)
        return;
     for (i = 0; i < MAXNOC; i++)
        putpower(i, &powbuf[i]);
+#ifdef _WIN32
     /*
-     * At least some versions of Windows fail to update st_mtime on
-     * write(), the st_mtime is not until the file is written to the
-     * disk.  Bad, because `power' displays that time.
-     * Force a sync to ensure the st_time is correct.
+     * At least some versions of Windows fail to update mtime on
+     * write(), they delay it until the write actually hits the disk.
+     * Bad, because `power' displays that time.  Force it.
      */
     fsync(empfile[EF_POWER].fd);
+#endif
 }
 
 static int