|
|
1.1 ! root 1: /* ! 2: * Dump tapes. ! 3: * A dump tape begins with a header ! 4: * record. This contains the attributes of the ! 5: * tape. ! 6: * The remainder of the tape is filled with ! 7: * arrays of dumpdata records. The map comes first, ! 8: * then all the directories, then all the files. ! 9: */ ! 10: #ifndef TYPES_H ! 11: #include <sys/types.h> ! 12: #endif ! 13: #ifndef DIR_H ! 14: #include <sys/dir.h> ! 15: #endif ! 16: #ifndef INO_H ! 17: #include <sys/ino.h> ! 18: #endif ! 19: ! 20: /* ! 21: * Dump tape header. ! 22: * All entries are in cannonical ! 23: * format on the tape. ! 24: */ ! 25: struct dumpheader ! 26: { ! 27: int dh_magic; /* Magic number */ ! 28: ino_t dh_nino; /* # of inodes on file system */ ! 29: time_t dh_bdate; /* Date at beginning of dump */ ! 30: time_t dh_ddate; /* Dump since date */ ! 31: int dh_level; /* Dump level */ ! 32: int dh_reel; /* Reel number in dump */ ! 33: fsize_t dh_nbyte; /* Length of disc */ ! 34: int dh_blocking; /* Blocking factor */ ! 35: char dh_dev[DIRSIZ]; /* Name of dumped device */ ! 36: char dh_fname[6]; /* File system name */ ! 37: char dh_fpack[6]; /* File system pack name */ ! 38: int dh_checksum; /* Byte checksum */ ! 39: }; ! 40: ! 41: #define DH_MAG 0123456 /* Magic number */ ! 42: ! 43: /* ! 44: * Dump data blocks. ! 45: * These are all a big union. ! 46: * They are packed into much larger ! 47: * blocks on the tape. ! 48: */ ! 49: union dumpdata ! 50: { ! 51: struct { ! 52: int dd_type; /* Type = DD_EOT */ ! 53: } dumpdata1; ! 54: struct { ! 55: int dd_type; /* Type = DD_DATA */ ! 56: ino_t dd_ino; /* Inode number */ ! 57: daddr_t dd_block; /* Block number in file */ ! 58: int dd_size; /* Bytes used in this block */ ! 59: char dd_data[BUFSIZ];/* Data */ ! 60: } dumpdata2; ! 61: struct { ! 62: int dd_type; /* Type = DD_INO */ ! 63: ino_t dd_ino; /* Inode number */ ! 64: struct dinode dd_dinode; /* On disc inode */ ! 65: } dumpdata3; ! 66: struct { ! 67: int dd_type; /* Type = DD_MAP */ ! 68: ino_t dd_ino; /* Base inode of this map block */ ! 69: int dd_nmap; /* # of map entries */ ! 70: char dd_map[BUFSIZ]; /* Some map */ ! 71: } dumpdata4; ! 72: }; ! 73: ! 74: #define DD_EOT 0 /* End of dump */ ! 75: #define DD_INO 1 /* Inode */ ! 76: #define DD_DATA 2 /* Data block */ ! 77: #define DD_MAP 3 /* Map */ ! 78: ! 79: #define DD_BUSY 01 /* Inode in use */ ! 80: #define DD_DUMP 02 /* Inode dumped */ ! 81: #define DD_DIR 04 /* Inode is a directory */ ! 82: #define DD_DEJA 010 /* Already seen flag (dump) */ ! 83: #define DD_HERE (DD_BUSY|DD_DUMP) /* On the tape */ ! 84: ! 85: /* ! 86: * This structure is used ! 87: * to hold the dump dates in the ! 88: * file `/etc/ddate'. ! 89: */ ! 90: struct idates ! 91: { ! 92: char id_name[DIRSIZ]; /* Device name */ ! 93: int id_incno; /* Level */ ! 94: time_t id_ddate; /* The date of the dump */ ! 95: }; ! 96: ! 97: #define DDATE "/etc/ddate" /* Date file name */ ! 98: #define DTAPE "/dev/dump" /* Default dump tape */ ! 99: #define DFSYS "" /* No default file system */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.