/*
* Copyright (c) 2012-2013 Apple Computer, Inc. All Rights Reserved.
- *
+ *
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
- *
+ *
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
- *
+ *
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
- *
+ *
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
- *
+ *
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
//#define IORDEBUG_IOLOG
-#if defined(IORDEBUG_IOLOG)
+#if defined(IORDEBUG_IOLOG)
#define IORLOG(fmt, args...) \
do { \
IOLog((fmt), ##args); \
} while(0)
#else
-#define IORLOG(fmt, args...)
+#define IORLOG(fmt, args...)
#endif
#define IORERROR_LOG
#define PREFL_MEMOP_FAIL(__val, __type) do { \
if (__val <= 0) { \
- IORERROR("%s - %s <= 0!\n", __func__, #__val); \
- res = kIOReturnUnderrun; \
- goto finish; \
+ IORERROR("%s - %s <= 0!\n", __func__, #__val); \
+ res = kIOReturnUnderrun; \
+ goto finish; \
} else if (__val > INT_MAX / (int)sizeof(__type)) { \
- IORERROR("%s - %s > INT_MAX / sizeof(%s)!\n",__func__,#__val,#__type);\
- res = kIOReturnOverrun; \
- goto finish; \
+ IORERROR("%s - %s > INT_MAX / sizeof(%s)!\n",__func__,#__val,#__type);\
+ res = kIOReturnOverrun; \
+ goto finish; \
} \
} while(0)
#define PREFL_MEMOP_PANIC(__val, __type) do { \
if (__val <= 0) { \
- panic("%s - %s <= 0!", __func__, #__val); \
+ panic("%s - %s <= 0!", __func__, #__val); \
} else if (__val > INT_MAX / (int)sizeof(__type)) { \
- panic("%s - %s > INT_MAX / sizeof(%s)!", __func__, #__val, #__type); \
+ panic("%s - %s > INT_MAX / sizeof(%s)!", __func__, #__val, #__type); \
} \
} while(0)
#define IOREPORTER_CHECK_LOCK() \
do { \
if (!_reporterIsLocked) { \
- panic("%s was called out of locked context!", __PRETTY_FUNCTION__); \
+ panic("%s was called out of locked context!", __PRETTY_FUNCTION__); \
} \
} while(0) \
#define IOREPORTER_CHECK_CONFIG_LOCK() \
do { \
if (!_reporterConfigIsLocked) { \
- panic("%s was called out of config locked context!", __PRETTY_FUNCTION__); \
+ panic("%s was called out of config locked context!", __PRETTY_FUNCTION__); \
} \
} while(0) \
#endif /* ! _IOEPORTERDEFS_H */
-