Changeset View
Changeset View
Standalone View
Standalone View
head/sbin/dump/dump.h
Show All 30 Lines | |||||
* @(#)dump.h 8.2 (Berkeley) 4/28/95 | * @(#)dump.h 8.2 (Berkeley) 4/28/95 | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
/* | /* | ||||
* Dump maps used to describe what is to be dumped. | * Dump maps used to describe what is to be dumped. | ||||
*/ | */ | ||||
int mapsize; /* size of the state maps */ | extern int mapsize; /* size of the state maps */ | ||||
char *usedinomap; /* map of allocated inodes */ | extern char *usedinomap; /* map of allocated inodes */ | ||||
char *dumpdirmap; /* map of directories to be dumped */ | extern char *dumpdirmap; /* map of directories to be dumped */ | ||||
char *dumpinomap; /* map of files to be dumped */ | extern char *dumpinomap; /* map of files to be dumped */ | ||||
/* | /* | ||||
* Map manipulation macros. | * Map manipulation macros. | ||||
*/ | */ | ||||
#define SETINO(ino, map) \ | #define SETINO(ino, map) \ | ||||
map[(u_int)((ino) - 1) / CHAR_BIT] |= \ | map[(u_int)((ino) - 1) / CHAR_BIT] |= \ | ||||
1 << ((u_int)((ino) - 1) % CHAR_BIT) | 1 << ((u_int)((ino) - 1) % CHAR_BIT) | ||||
#define CLRINO(ino, map) \ | #define CLRINO(ino, map) \ | ||||
map[(u_int)((ino) - 1) / CHAR_BIT] &= \ | map[(u_int)((ino) - 1) / CHAR_BIT] &= \ | ||||
~(1 << ((u_int)((ino) - 1) % CHAR_BIT)) | ~(1 << ((u_int)((ino) - 1) % CHAR_BIT)) | ||||
#define TSTINO(ino, map) \ | #define TSTINO(ino, map) \ | ||||
(map[(u_int)((ino) - 1) / CHAR_BIT] & \ | (map[(u_int)((ino) - 1) / CHAR_BIT] & \ | ||||
(1 << ((u_int)((ino) - 1) % CHAR_BIT))) | (1 << ((u_int)((ino) - 1) % CHAR_BIT))) | ||||
/* | /* | ||||
* All calculations done in 0.1" units! | * All calculations done in 0.1" units! | ||||
*/ | */ | ||||
char *disk; /* name of the disk file */ | extern char *disk; /* name of the disk file */ | ||||
char *tape; /* name of the tape file */ | extern char *tape; /* name of the tape file */ | ||||
char *popenout; /* popen(3) per-"tape" command */ | extern char *popenout; /* popen(3) per-"tape" command */ | ||||
char *dumpdates; /* name of the file containing dump date information*/ | extern char *dumpdates; /* name of the file containing dump date info */ | ||||
char *temp; /* name of the file for doing rewrite of dumpdates */ | extern int lastlevel; /* dump level of previous dump */ | ||||
int lastlevel; /* dump level of previous dump */ | extern int level; /* dump level of this dump */ | ||||
int level; /* dump level of this dump */ | extern int uflag; /* update flag */ | ||||
int uflag; /* update flag */ | extern int diskfd; /* disk file descriptor */ | ||||
int diskfd; /* disk file descriptor */ | extern int pipeout; /* true => output to standard output */ | ||||
int tapefd; /* tape file descriptor */ | extern ino_t curino; /* current inumber; used globally */ | ||||
int pipeout; /* true => output to standard output */ | extern int newtape; /* new tape flag */ | ||||
ino_t curino; /* current inumber; used globally */ | extern int density; /* density in 0.1" units */ | ||||
int newtape; /* new tape flag */ | extern long tapesize; /* estimated tape size, blocks */ | ||||
int density; /* density in 0.1" units */ | extern long tsize; /* tape size in 0.1" units */ | ||||
long tapesize; /* estimated tape size, blocks */ | extern int etapes; /* estimated number of tapes */ | ||||
long tsize; /* tape size in 0.1" units */ | extern int nonodump; /* if set, do not honor UF_NODUMP user flags */ | ||||
long asize; /* number of 0.1" units written on current tape */ | extern int unlimited; /* if set, write to end of medium */ | ||||
int etapes; /* estimated number of tapes */ | extern int cachesize; /* size of block cache in bytes */ | ||||
int nonodump; /* if set, do not honor UF_NODUMP user flags */ | extern int rsync_friendly; /* be friendly with rsync */ | ||||
int unlimited; /* if set, write to end of medium */ | extern int notify; /* notify operator flag */ | ||||
int cachesize; /* size of block cache in bytes */ | extern int blockswritten; /* number of blocks written on current tape */ | ||||
int rsync_friendly; /* be friendly with rsync */ | extern int tapeno; /* current tape number */ | ||||
extern int ntrec; /* blocking factor on tape */ | |||||
extern long blocksperfile; /* number of blocks per output file */ | |||||
extern int cartridge; /* assume non-cartridge tape */ | |||||
extern char *host; /* remote host (if any) */ | |||||
extern time_t tstart_writing; /* when started writing the first tape block */ | |||||
extern time_t tend_writing; /* after writing the last tape block */ | |||||
extern int passno; /* current dump pass number */ | |||||
extern struct fs *sblock; /* the file system super block */ | |||||
extern long dev_bsize; /* block size of underlying disk device */ | |||||
extern int dev_bshift; /* log2(dev_bsize) */ | |||||
extern int tp_bshift; /* log2(TP_BSIZE) */ | |||||
int notify; /* notify operator flag */ | |||||
int blockswritten; /* number of blocks written on current tape */ | |||||
int tapeno; /* current tape number */ | |||||
time_t tstart_writing; /* when started writing the first tape block */ | |||||
time_t tend_writing; /* after writing the last tape block */ | |||||
int passno; /* current dump pass number */ | |||||
struct fs *sblock; /* the file system super block */ | |||||
long dev_bsize; /* block size of underlying disk device */ | |||||
int dev_bshift; /* log2(dev_bsize) */ | |||||
int tp_bshift; /* log2(TP_BSIZE) */ | |||||
/* operator interface functions */ | /* operator interface functions */ | ||||
void broadcast(const char *message); | void broadcast(const char *message); | ||||
void infosch(int); | void infosch(int); | ||||
void lastdump(int arg); /* int should be char */ | void lastdump(int arg); /* int should be char */ | ||||
void msg(const char *fmt, ...) __printflike(1, 2); | void msg(const char *fmt, ...) __printflike(1, 2); | ||||
void msgtail(const char *fmt, ...) __printflike(1, 2); | void msgtail(const char *fmt, ...) __printflike(1, 2); | ||||
int query(const char *question); | int query(const char *question); | ||||
void quit(const char *fmt, ...) __printflike(1, 2); | void quit(const char *fmt, ...) __printflike(1, 2); | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
* The contents of the file _PATH_DUMPDATES is maintained both on | * The contents of the file _PATH_DUMPDATES is maintained both on | ||||
* a linked list, and then (eventually) arrayified. | * a linked list, and then (eventually) arrayified. | ||||
*/ | */ | ||||
struct dumpdates { | struct dumpdates { | ||||
char dd_name[NAME_MAX+3]; | char dd_name[NAME_MAX+3]; | ||||
int dd_level; | int dd_level; | ||||
time_t dd_ddate; | time_t dd_ddate; | ||||
}; | }; | ||||
int nddates; /* number of records (might be zero) */ | extern int nddates; /* number of records (might be zero) */ | ||||
struct dumpdates **ddatev; /* the arrayfied version */ | extern struct dumpdates **ddatev; /* the arrayfied version */ | ||||
void initdumptimes(void); | void initdumptimes(void); | ||||
void getdumptime(void); | void getdumptime(void); | ||||
void putdumptime(void); | void putdumptime(void); | ||||
#define ITITERATE(i, ddp) \ | #define ITITERATE(i, ddp) \ | ||||
if (ddatev != NULL) \ | if (ddatev != NULL) \ | ||||
for (ddp = ddatev[i = 0]; i < nddates; ddp = ddatev[++i]) | for (ddp = ddatev[i = 0]; i < nddates; ddp = ddatev[++i]) | ||||
#define DUMPFMTLEN 53 /* max device pathname length */ | #define DUMPFMTLEN 53 /* max device pathname length */ | ||||
Show All 9 Lines |