2 * Copyright 2009, Michael Lotz, mmlr@mlotz.ch.
3 * Distributed under the terms of the MIT License.
10 #define ATA_TRACE_START 0x00
11 #define ATA_TRACE_FLUSH 0x01
12 #define ATA_TRACE_SYSLOG 0x02
13 #define ATA_TRACE_FLUSH_SYSLOG 0x03
16 #define TRACE(x...) { \
17 ata_trace_printf(ATA_TRACE_START, \
18 "ata%s: ", _DebugContext()); \
19 ata_trace_printf(ATA_TRACE_FLUSH, x); \
21 #define TRACE_FUNCTION(x...) { \
22 ata_trace_printf(ATA_TRACE_START, \
23 "ata%s: %s: ", _DebugContext(), \
25 ata_trace_printf(ATA_TRACE_FLUSH, x); \
28 #define TRACE(x...) /* nothing */
29 #define TRACE_FUNCTION(x...) /* nothing */
32 #define TRACE_ALWAYS(x...) { \
33 ata_trace_printf(ATA_TRACE_START, \
34 "ata%s: ", _DebugContext()); \
35 ata_trace_printf(ATA_TRACE_FLUSH_SYSLOG, x); \
37 #define TRACE_ERROR(x...) { \
38 ata_trace_printf(ATA_TRACE_START, \
39 "ata%s error: ", _DebugContext()); \
40 ata_trace_printf(ATA_TRACE_FLUSH_SYSLOG, x); \
43 void ata_trace_printf(uint32 flags
, const char *format
, ...);
51 #endif // ATA_TRACING_H