[5486] Define O_DSYNC as O_SYNC if necessary.
Revision: 5486
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5486 Author: aliguori Date: 2008-10-14 18:00:38 +0000 (Tue, 14 Oct 2008)
Log Message:
-----------
Define O_DSYNC as O_SYNC if necessary.
O_DSYNC isn't available on OS X.
Modified Paths:
--------------
trunk/block-raw-posix.c
Modified: trunk/block-raw-posix.c
===================================================================
block-raw-posix.c +5 -0
@@ -73,6 +73,11 @@ #define DEBUG_BLOCK_PRINT(formatCstr, args...)#endif +/* OS X does not have O_DSYNC */ +#ifndef O_DSYNC +#define O_SYNC +#endif +/* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */ #ifndef O_DIRECT #define O_DIRECT O_DSYNC
Quoted 1 line · Anthony Liguori
Define
O_DSYNCasO_SYNCif necessary.
...
block-raw-posix.c line 80
Quoted 5 lines
block-raw-posix.c +5
-0+/* OS X does not have O_DSYNC */ +#ifndef O_DSYNC +#define O_SYNC +#endif +
Not "+#define O_DSYNC O_SYNC"?
Robert Riebisch
Signature · 2 lines
BTTR Software http://www.bttr-software.de/
Quoted 9 lines · Robert Riebisch
Quoted 2 lines · Anthony Liguori
Define
O_DSYNCasO_SYNCif necessary....
Quoted 9 lines
block-raw-posix.c line 80
Quoted 6 lines
block-raw-posix.c +5
-0+/* OS X does not have O_DSYNC */ +#ifndef O_DSYNC +#define O_SYNC +#endif +Not "+#define
O_DSYNCO_SYNC"?
Sigh, sorry about that. Thanks for catching that.
Regards,
Anthony Liguori
Quoted 2 lines
Robert Riebisch
Quoted 6 lines · Robert Riebisch
Quoted 1 line · Anthony Liguori
Define
O_DSYNCasO_SYNCif necessary....
Quoted 7 lines
block-raw-posix.c line 80
Quoted 5 lines
block-raw-posix.c +5
-0+/* OS X does not have O_DSYNC */ +#ifndef O_DSYNC +#define O_SYNC +#endif +Not "+#define
O_DSYNCO_SYNC"?
OS X does not have O_SYNC too...
You can use fcntl() with F_NOCACHE to emulate O_DIRECT, I think.
BSD is not POSIX ;-)
Regards,
Laurent
----------------------- Laurent Vivier ---------------------- "The best way to predict the future is to invent it."
- Alan Kay
Quoted 17 lines · Laurent Vivier
Quoted 6 lines · Robert Riebisch
Quoted 1 line · Anthony Liguori
Define
O_DSYNCasO_SYNCif necessary....
Quoted 7 lines
block-raw-posix.c line 80
Quoted 5 lines
block-raw-posix.c +5
-0+/* OS X does not have O_DSYNC */ +#ifndef O_DSYNC +#define O_SYNC +#endif +Not "+#define
O_DSYNCO_SYNC"?
Quoted 1 line
OS X does not have
O_SYNCtoo...
Sorry, I'm wrong, it has O_SYNC, but "man open" doesn't give it...
Laurent
----------------------- Laurent Vivier ---------------------- "The best way to predict the future is to invent it."
- Alan Kay
Quoted 1 line · Laurent Vivier
Sorry, I'm wrong, it has
O_SYNC, but "man open" doesn't give it...
Whew. I was worried there for a moment :-)
Regards,
Anthony Liguori
Quoted 11 lines
Laurent
----------------------- Laurent Vivier ---------------------- "The best way to predict the future is to invent it."
- Alan Kay