| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "config.h" |
| 4 |
|
| 5 |
#include <stdint.h> |
| 6 |
|
| 7 |
#include "compat/include/protocols/dumprestore.h" |
| 8 |
|
| 9 |
extern int ntrec; |
| 10 |
extern int dokerberos; |
| 11 |
extern int abortifconnerr; |
| 12 |
|
| 13 |
extern int rshpid; |
| 14 |
extern union u_spcl u_spcl; |
| 15 |
extern union u_data u_data; |
| 16 |
extern char *usedinomap; |
| 17 |
extern char *dumpinomap; |
| 18 |
extern dump_ino_t volinfo[TP_NINOS]; |
| 19 |
extern uint32_t dflag; |
| 20 |
extern int vflag; |
| 21 |
extern int qflag; |
| 22 |
extern int Mflag; |
| 23 |
extern char lastmsg[]; |
| 24 |
extern const char *msgprefix; |
| 25 |
|
| 26 |
|
| 27 |
#define spcl u_spcl.s_spcl |
| 28 |
|
| 29 |
extern void msg(const char*, ...) __attribute__ ((__format__ (__printf__, 1, 2))); |
| 30 |
extern void msgtail (const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2))); |
| 31 |
|
| 32 |
#define Dmsg(LEVEL, FMT, ...) do { \ |
| 33 |
if (dflag&(LEVEL)) { \ |
| 34 |
if (dflag&DEBUG_PRINT_LEVEL) \ |
| 35 |
msg("%08x/" FMT, (LEVEL), ##__VA_ARGS__); \ |
| 36 |
else \ |
| 37 |
msg(FMT, ##__VA_ARGS__); \ |
| 38 |
} \ |
| 39 |
} while(0) |
| 40 |
#define Vmsg(...) do { if (vflag) msg(__VA_ARGS__); } while(0) |
| 41 |
|
| 42 |
#define DEFAULT_DEBUG 0x00000001U |
| 43 |
#define DIRDEBUG 0x00000002U |
| 44 |
#define FDEBUG 0x00000004U |
| 45 |
#define TDEBUG 0x00000008U |
| 46 |
#define WRITEDEBUG 0x00000010U |
| 47 |
#define DEBUG_QFA 0x00000020U |
| 48 |
#define DEBUG_PRINT_LEVEL 0x80000000U |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
#define X_FINOK 0 |
| 54 |
#define X_STARTUP 1 |
| 55 |
#define X_REWRITE 2 |
| 56 |
#define X_ABORT 3 |