qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] replace O_SYNC with O_FSYNC


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] replace O_SYNC with O_FSYNC
Date: Sat, 20 Jun 2009 09:31:52 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Hi,

m a wrote:
This patch replaces O_SYNC with O_FSYNC. These two flags do the same thing, but only O_FSYNC is available in Mac OS 10.3 and under. It only replaces O_SYNC if it doesn't exist. This patch allows the file block-raw-posix.c to compile on Mac OS 10.3. This is my first time submitting a patch, so there might have been a few mistakes made.

Please include a Signed-off-by line and use C-style comments instead of C++ style comments. Otherwise, looks good.

Regards,

Anthony Liguori

--- block-raw-posix.c    Wed May 20 16:46:58 2009
+++ block-raw-posix (updated).c    Fri Jun 19 22:01:07 2009
@@ -73,6 +73,12 @@
 #define DEBUG_BLOCK_PRINT(formatCstr, args...)
 #endif

+// O_SYNC isn't available on Mac OS 10.3 and under
+// O_SYNC and O_FSYNC do the same thing
+#ifndef O_SYNC
+#define O_SYNC O_FSYNC
+#endif
+
 /* OS X does not have O_DSYNC */
 #ifndef O_DSYNC
 #define O_DSYNC O_SYNC









reply via email to

[Prev in Thread] Current Thread [Next in Thread]