mirror of
https://git.freebsd.org/ports.git
synced 2025-05-29 17:36:28 -04:00
fsync (and friends, like open(O_SYNC)). This has two side-effects: making software that writes data safely to disk a lot quicker and making this software no longer crash safe. DO NOT use libeatmydata on software where you care about what it stores. It's called libEAT-MY-DATA for a reason. PR: ports/142892 Submitted by: Attila Nagy <bra at fsn.hu>
19 lines
369 B
C
19 lines
369 B
C
--- eatmydata.c.orig 2009-05-12 03:11:01.000000000 +0200
|
|
+++ eatmydata.c 2010-01-16 20:33:45.000000000 +0100
|
|
@@ -53,10 +53,15 @@
|
|
mode_t mode;
|
|
|
|
va_start(ap, flags);
|
|
- mode= va_arg(ap, mode_t);
|
|
+ mode= va_arg(ap, int);
|
|
va_end(ap);
|
|
|
|
+#if defined(O_DSYNC)
|
|
flags &= ~(O_SYNC|O_DSYNC);
|
|
+#else
|
|
+ flags &= ~(O_SYNC);
|
|
+#endif
|
|
+
|
|
|
|
if(!libc_open)
|
|
eatmydata_init();
|