From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYRcR-0003Li-Sf for qemu-devel@nongnu.org; Wed, 07 Dec 2011 19:13:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYRcO-00073X-VL for qemu-devel@nongnu.org; Wed, 07 Dec 2011 19:13:47 -0500 Received: from mout.web.de ([212.227.15.4]:58173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYRcO-00073T-Gh for qemu-devel@nongnu.org; Wed, 07 Dec 2011 19:13:44 -0500 Message-ID: <4EE000F7.90501@web.de> Date: Thu, 08 Dec 2011 01:12:39 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1320950407-43512-1-git-send-email-pavel.borzenkov@gmail.com> <1320950407-43512-3-git-send-email-pavel.borzenkov@gmail.com> <4ED57AF3.3000402@web.de> In-Reply-To: <4ED57AF3.3000402@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Borzenkov Cc: Kevin Wolf , Andrzej Zaborowski , qemu-devel@nongnu.org, Ben Leslie Am 30.11.2011 01:38, schrieb Andreas Färber: > Am 10.11.2011 19:40, schrieb Pavel Borzenkov: >> Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac >> OS X host. The patch is based on the Ben Leslie's patch: >> http://patchwork.ozlabs.org/patch/97859/ >> >> Signed-off-by: Pavel Borzenkov > > Reviewed-by: Andreas Färber Thanks, applied to the cocoa branch with a minor edit (s/the//). http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/cocoa-for-upstream Andreas >> --- >> block/raw-posix.c | 8 ++++---- >> 1 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/block/raw-posix.c b/block/raw-posix.c >> index 17e1c6f..ee08f80 100644 >> --- a/block/raw-posix.c >> +++ b/block/raw-posix.c >> @@ -29,7 +29,7 @@ >> #include "module.h" >> #include "block/raw-posix-aio.h" >> >> -#ifdef CONFIG_COCOA >> +#if defined(__APPLE__) && (__MACH__) >> #include >> #include >> #include >> @@ -487,7 +487,7 @@ again: >> } >> if (size == 0) >> #endif >> -#ifdef CONFIG_COCOA >> +#if defined(__APPLE__) && defined(__MACH__) >> size = LONG_LONG_MAX; >> #else >> size = lseek(fd, 0LL, SEEK_END); >> @@ -632,7 +632,7 @@ static BlockDriver bdrv_file = { >> /***********************************************/ >> /* host device */ >> >> -#ifdef CONFIG_COCOA >> +#if defined(__APPLE__) && defined(__MACH__) >> static kern_return_t FindEjectableCDMedia( io_iterator_t *mediaIterator ); >> static kern_return_t GetBSDPath( io_iterator_t mediaIterator, char *bsdPath, CFIndex maxPathSize ); >> >> @@ -710,7 +710,7 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags) >> { >> BDRVRawState *s = bs->opaque; >> >> -#ifdef CONFIG_COCOA >> +#if defined(__APPLE__) && defined(__MACH__) >> if (strstart(filename, "/dev/cdrom", NULL)) { >> kern_return_t kernResult; >> io_iterator_t mediaIterator;