mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-23 14:41:43 +00:00
add debug_print macro for hashindex debugging, see #3807
This commit is contained in:
parent
491d69a5d6
commit
ce4d248e0b
1 changed files with 10 additions and 0 deletions
|
@ -15,6 +15,16 @@
|
||||||
#define MAGIC "BORG_IDX"
|
#define MAGIC "BORG_IDX"
|
||||||
#define MAGIC_LEN 8
|
#define MAGIC_LEN 8
|
||||||
|
|
||||||
|
#define DEBUG 0
|
||||||
|
|
||||||
|
#define debug_print(fmt, ...) \
|
||||||
|
do { \
|
||||||
|
if (DEBUG) { \
|
||||||
|
fprintf(stderr, fmt, __VA_ARGS__); \
|
||||||
|
fflush(NULL); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char magic[MAGIC_LEN];
|
char magic[MAGIC_LEN];
|
||||||
int32_t num_entries;
|
int32_t num_entries;
|
||||||
|
|
Loading…
Reference in a new issue