#pragma once #include "config.h" // IWYU pragma: keep #include #include "compat/include/protocols/dumprestore.h" extern int ntrec; /* number of TP_BSIZE records per tape block */ extern int dokerberos; extern int abortifconnerr; /* set to 1 if dumprmt should exit on connection errors otherwise just print a message using msg */ extern int rshpid; extern union u_spcl u_spcl; extern union u_data u_data; extern char *usedinomap; /* map of inodes that are in use on this fs */ extern char *dumpinomap; /* map of inodes on this dump tape */ extern dump_ino_t volinfo[TP_NINOS]; /* which inode on which volume archive info */ extern uint32_t dflag; /* print out debugging info */ extern int vflag; /* verbose flag */ extern int qflag; /* abort on operator intervention required */ extern int Mflag; /* multi-volume flag */ extern char lastmsg[]; extern const char *msgprefix; #define spcl u_spcl.s_spcl extern void msg(const char*, ...) __attribute__ ((__format__ (__printf__, 1, 2))); extern void msgtail (const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2))); #define Dmsg(LEVEL, FMT, ...) do { \ if (dflag&(LEVEL)) { \ if (dflag&DEBUG_PRINT_LEVEL) \ msg("%08x/" FMT, (LEVEL), ##__VA_ARGS__); \ else \ msg(FMT, ##__VA_ARGS__); \ } \ } while(0) #define Vmsg(...) do { if (vflag) msg(__VA_ARGS__); } while(0) #define DEFAULT_DEBUG 0x00000001U #define DIRDEBUG 0x00000002U #define FDEBUG 0x00000004U #define TDEBUG 0x00000008U #define WRITEDEBUG 0x00000010U #define DEBUG_QFA 0x00000020U #define DEBUG_PRINT_LEVEL 0x80000000U /* * Exit status codes */ #define X_FINOK 0 /* normal exit */ #define X_STARTUP 1 /* startup error */ #define X_REWRITE 2 /* restart writing from the check point */ #define X_ABORT 3 /* abort dump; don't attempt checkpointing */