-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbtrfs_debug.h
More file actions
34 lines (26 loc) · 832 Bytes
/
btrfs_debug.h
File metadata and controls
34 lines (26 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
#ifdef BTRFS_DEBUG
#include <stdio.h>
#include "types.h"
#define btrfs_debug_printf(...) fprintf(stderr, __VA_ARGS__)
#define btrfs_debug_start_section(__name) { \
btrfs_debug_indent(); \
btrfs_debug_printf("---- " __name " ----\n"); \
btrfs_debug_increase_indent(1); \
}
#define btrfs_debug_end_section(__name) { \
btrfs_debug_decrease_indent(1); \
btrfs_debug_indent(); \
btrfs_debug_printf("---- /" __name " ----\n"); \
}
void btrfs_debug_increase_indent(u8 shift);
void btrfs_debug_decrease_indent(u8 shift);
void btrfs_debug_indent();
#else
#define btrfs_debug_printf(...)
#define btrfs_debug_start_section(__name)
#define btrfs_debug_end_section(__name)
#define btrfs_debug_increase_indent(__shift)
#define btrfs_debug_decrease_indent(__shift)
#define btrfs_debug_indent()
#endif