14704Smckusick /* Copyright (c) 1981 Regents of the University of California */ 24704Smckusick 3*5321Smckusic /* "@(#)dumprestore.h 1.3 01/05/82" */ 44704Smckusick 5*5321Smckusic /* 6*5321Smckusic * TP_BSIZE is the size of file blocks on the dump tapes. 7*5321Smckusic * Note that TP_BSIZE must be a multiple of DEV_BSIZE. 8*5321Smckusic * 9*5321Smckusic * NTREC is the number of TP_BSIZE blocks that are written 10*5321Smckusic * in each tape record. 11*5321Smckusic * 12*5321Smckusic * BLKING calculates the number of TP_BSIZE blocks in a file 13*5321Smckusic * system frag. 14*5321Smckusic * 15*5321Smckusic * TP_NINDIR is the number of indirect pointers in a TS_INODE 16*5321Smckusic * or TS_ADDR record. Note that it must be a power of two. 17*5321Smckusic */ 184775Smckusic #define TP_BSIZE 1024 194704Smckusick #define NTREC 10 20*5321Smckusic #define BLKING(fs) ((fs)->fs_fsize/TP_BSIZE) 214775Smckusic #define TP_NINDIR (TP_BSIZE/2) 224704Smckusick 234704Smckusick #define TS_TAPE 1 244704Smckusick #define TS_INODE 2 254704Smckusick #define TS_BITS 3 264704Smckusick #define TS_ADDR 4 274704Smckusick #define TS_END 5 284704Smckusick #define TS_CLRI 6 294704Smckusick #define MAGIC (int)60011 304704Smckusick #define CHECKSUM (int)84446 314704Smckusick 324775Smckusic union u_spcl { 334775Smckusic char dummy[TP_BSIZE]; 344775Smckusic struct s_spcl { 354775Smckusic int c_type; 364775Smckusic time_t c_date; 374775Smckusic time_t c_ddate; 384775Smckusic int c_volume; 394775Smckusic daddr_t c_tapea; 404775Smckusic ino_t c_inumber; 414775Smckusic int c_magic; 424775Smckusic int c_checksum; 434775Smckusic struct dinode c_dinode; 444775Smckusic int c_count; 454775Smckusic char c_addr[TP_NINDIR]; 464775Smckusic } s_spcl; 474775Smckusic } u_spcl; 484704Smckusick 494775Smckusic #define spcl u_spcl.s_spcl 504775Smckusic 514704Smckusick struct idates { 524704Smckusick char id_name[16]; 534704Smckusick char id_incno; 544704Smckusick time_t id_ddate; 554704Smckusick }; 564704Smckusick 574704Smckusick #define DUMPOUTFMT "%-16s %c %s" /* for printf */ 584704Smckusick /* name, incno, ctime(date) */ 594704Smckusick #define DUMPINFMT "%16s %c %[^\n]\n" /* inverse for scanf */ 60