From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MI1bs-0008Nt-RN for qemu-devel@nongnu.org; Sat, 20 Jun 2009 10:32:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MI1bo-0008Ip-CW for qemu-devel@nongnu.org; Sat, 20 Jun 2009 10:32:00 -0400 Received: from [199.232.76.173] (port=59725 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MI1bn-0008Ih-U6 for qemu-devel@nongnu.org; Sat, 20 Jun 2009 10:31:55 -0400 Received: from mail-gx0-f207.google.com ([209.85.217.207]:55171) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MI1bn-0002FN-J5 for qemu-devel@nongnu.org; Sat, 20 Jun 2009 10:31:55 -0400 Received: by gxk3 with SMTP id 3so9353032gxk.10 for ; Sat, 20 Jun 2009 07:31:54 -0700 (PDT) Message-ID: <4A3CF2D8.1030908@codemonkey.ws> Date: Sat, 20 Jun 2009 09:31:52 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] replace O_SYNC with O_FSYNC References: <20f282157f4df2f513fdb51427be26c7@hotpop.com> In-Reply-To: <20f282157f4df2f513fdb51427be26c7@hotpop.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: m a Cc: qemu-devel@nongnu.org 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 > > > >