(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;
|
return;
|
||||||
for (i = 0; i < MAXNOC; i++)
|
for (i = 0; i < MAXNOC; i++)
|
||||||
putpower(i, &powbuf[i]);
|
putpower(i, &powbuf[i]);
|
||||||
|
#ifdef _WIN32
|
||||||
/*
|
/*
|
||||||
* At least some versions of Windows fail to update st_mtime on
|
* At least some versions of Windows fail to update mtime on
|
||||||
* write(), the st_mtime is not until the file is written to the
|
* write(), they delay it until the write actually hits the disk.
|
||||||
* disk. Bad, because `power' displays that time.
|
* Bad, because `power' displays that time. Force it.
|
||||||
* Force a sync to ensure the st_time is correct.
|
|
||||||
*/
|
*/
|
||||||
fsync(empfile[EF_POWER].fd);
|
fsync(empfile[EF_POWER].fd);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue