1/*
2 * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24// AppleCDDAFileSystemDebug.h created by CJS on Tue 20-Jun-2000
25
26#ifndef __APPLE_CDDA_FS_DEBUG_H__
27#define __APPLE_CDDA_FS_DEBUG_H__
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <IOKit/IOLib.h>
34
35// Debug Options
36#define DEBUG			0
37#define DEBUGLEVEL		0		// 1-5  1=fatal errors only, 5=full debugging
38
39#if DEBUG
40
41	#if DEBUGLEVEL > 2
42		#define DebugLog(x)		kprintf	x		// Turn DebugLog() on
43	#else
44		#define DebugLog(x)						// Turn DebugLog() off
45	#endif
46
47	#if DEBUGLEVEL > 3
48		#define MACH_ASSERT		1				// To turn assert() on
49	#endif
50
51#else
52
53	#define DebugLog(x)							// Turn DebugLog() off
54
55#endif
56
57
58#include <kern/assert.h>		// for assert()
59
60
61#if DEBUG
62
63	#if DEBUGLEVEL > 5
64		#define DebugAssert(x)			( void ) assert	x	// Turn DebugAssert() on
65		#ifndef __cplusplus
66			#define	unused
67		#endif
68	#else
69		#define DebugAssert(x)								// Turn DebugAssert() off
70		#ifndef __cplusplus
71			#define	unused				__unused
72		#endif
73	#endif
74
75#else
76
77	#define DebugAssert(x)						// Turn DebugAssert() off
78	#ifndef __cplusplus
79		#define	unused					__unused
80	#endif
81
82#endif
83
84#ifdef __cplusplus
85}
86#endif
87
88
89#endif // __APPLE_CDDA_FS_DEBUG_H__
90