(gen_power) [!_WIN32]: Previous revision inserted fsync(), where
previously something equivalent was done only for _WIN32. Revert that.
This commit is contained in:
parent
8d8c6972a1
commit
c940c76a01
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue