* [Qemu-devel] [5486] Define O_DSYNC as O_SYNC if necessary.
@ 2008-10-14 18:00 Anthony Liguori
2008-10-14 18:12 ` Robert Riebisch
0 siblings, 1 reply; 6+ messages in thread
From: Anthony Liguori @ 2008-10-14 18:00 UTC (permalink / raw)
To: qemu-devel
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.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/block-raw-posix.c
Modified: trunk/block-raw-posix.c
===================================================================
--- trunk/block-raw-posix.c 2008-10-14 14:42:54 UTC (rev 5485)
+++ trunk/block-raw-posix.c 2008-10-14 18:00:38 UTC (rev 5486)
@@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [5486] Define O_DSYNC as O_SYNC if necessary.
2008-10-14 18:00 [Qemu-devel] [5486] Define O_DSYNC as O_SYNC if necessary Anthony Liguori
@ 2008-10-14 18:12 ` Robert Riebisch
2008-10-14 18:15 ` Anthony Liguori
2008-10-14 18:21 ` Laurent Vivier
0 siblings, 2 replies; 6+ messages in thread
From: Robert Riebisch @ 2008-10-14 18:12 UTC (permalink / raw)
To: qemu-devel
Anthony Liguori wrote:
> Define O_DSYNC as O_SYNC if necessary.
...
> +/* OS X does not have O_DSYNC */
> +#ifndef O_DSYNC
> +#define O_SYNC
> +#endif
> +
Not "+#define O_DSYNC O_SYNC"?
Robert Riebisch
--
BTTR Software
http://www.bttr-software.de/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [5486] Define O_DSYNC as O_SYNC if necessary.
2008-10-14 18:12 ` Robert Riebisch
@ 2008-10-14 18:15 ` Anthony Liguori
2008-10-14 18:21 ` Laurent Vivier
1 sibling, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2008-10-14 18:15 UTC (permalink / raw)
To: qemu-devel
Robert Riebisch wrote:
> Anthony Liguori wrote:
>
>
>> Define O_DSYNC as O_SYNC if necessary.
>>
>
> ...
>
>
>> +/* OS X does not have O_DSYNC */
>> +#ifndef O_DSYNC
>> +#define O_SYNC
>> +#endif
>> +
>>
>
> Not "+#define O_DSYNC O_SYNC"?
>
Sigh, sorry about that. Thanks for catching that.
Regards,
Anthony Liguori
> Robert Riebisch
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [5486] Define O_DSYNC as O_SYNC if necessary.
2008-10-14 18:12 ` Robert Riebisch
2008-10-14 18:15 ` Anthony Liguori
@ 2008-10-14 18:21 ` Laurent Vivier
2008-10-14 18:25 ` Laurent Vivier
1 sibling, 1 reply; 6+ messages in thread
From: Laurent Vivier @ 2008-10-14 18:21 UTC (permalink / raw)
To: qemu-devel
Le 14 oct. 08 à 20:12, Robert Riebisch a écrit :
> Anthony Liguori wrote:
>
>> Define O_DSYNC as O_SYNC if necessary.
>
> ...
>
>> +/* OS X does not have O_DSYNC */
>> +#ifndef O_DSYNC
>> +#define O_SYNC
>> +#endif
>> +
>
> Not "+#define O_DSYNC O_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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [5486] Define O_DSYNC as O_SYNC if necessary.
2008-10-14 18:21 ` Laurent Vivier
@ 2008-10-14 18:25 ` Laurent Vivier
2008-10-14 18:53 ` Anthony Liguori
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Vivier @ 2008-10-14 18:25 UTC (permalink / raw)
To: qemu-devel
Le 14 oct. 08 à 20:21, Laurent Vivier a écrit :
>
> Le 14 oct. 08 à 20:12, Robert Riebisch a écrit :
>
>> Anthony Liguori wrote:
>>
>>> Define O_DSYNC as O_SYNC if necessary.
>>
>> ...
>>
>>> +/* OS X does not have O_DSYNC */
>>> +#ifndef O_DSYNC
>>> +#define O_SYNC
>>> +#endif
>>> +
>>
>> Not "+#define O_DSYNC O_SYNC"?
>
> OS X does not have O_SYNC too...
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [5486] Define O_DSYNC as O_SYNC if necessary.
2008-10-14 18:25 ` Laurent Vivier
@ 2008-10-14 18:53 ` Anthony Liguori
0 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2008-10-14 18:53 UTC (permalink / raw)
To: qemu-devel
Laurent Vivier wrote:
> 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
> Laurent
> ----------------------- Laurent Vivier ----------------------
> "The best way to predict the future is to invent it."
> - Alan Kay
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-14 18:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 18:00 [Qemu-devel] [5486] Define O_DSYNC as O_SYNC if necessary Anthony Liguori
2008-10-14 18:12 ` Robert Riebisch
2008-10-14 18:15 ` Anthony Liguori
2008-10-14 18:21 ` Laurent Vivier
2008-10-14 18:25 ` Laurent Vivier
2008-10-14 18:53 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).