qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro
Date: Thu, 08 Dec 2011 01:12:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0

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 <address@hidden>
> 
> Reviewed-by: Andreas Färber <address@hidden>

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 <paths.h>
>>  #include <sys/param.h>
>>  #include <IOKit/IOKitLib.h>
>> @@ -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;




reply via email to

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