fixes q order problems and temporary file names when inchar > 'z'.
[unix-history] / usr / src / include / protocols / dumprestore.h
CommitLineData
8959d9ce
KM
1/* Copyright (c) 1981 Regents of the University of California */
2
fdd12620 3/* "@(#)dumprestore.h 2.4 %G%" */
8959d9ce 4
b6407c9d
KM
5/*
6 * TP_BSIZE is the size of file blocks on the dump tapes.
7 * Note that TP_BSIZE must be a multiple of DEV_BSIZE.
8 *
9 * NTREC is the number of TP_BSIZE blocks that are written
10 * in each tape record.
11 *
b6407c9d
KM
12 * TP_NINDIR is the number of indirect pointers in a TS_INODE
13 * or TS_ADDR record. Note that it must be a power of two.
14 */
f5bba473 15#define TP_BSIZE 1024
8959d9ce 16#define NTREC 10
f5bba473 17#define TP_NINDIR (TP_BSIZE/2)
8959d9ce
KM
18
19#define TS_TAPE 1
20#define TS_INODE 2
21#define TS_BITS 3
22#define TS_ADDR 4
23#define TS_END 5
24#define TS_CLRI 6
c287fc13
KM
25#define OFS_MAGIC (int)60011
26#define NFS_MAGIC (int)60012
8959d9ce
KM
27#define CHECKSUM (int)84446
28
f5bba473
KM
29union u_spcl {
30 char dummy[TP_BSIZE];
31 struct s_spcl {
32 int c_type;
33 time_t c_date;
34 time_t c_ddate;
35 int c_volume;
36 daddr_t c_tapea;
37 ino_t c_inumber;
38 int c_magic;
39 int c_checksum;
40 struct dinode c_dinode;
41 int c_count;
42 char c_addr[TP_NINDIR];
43 } s_spcl;
44} u_spcl;
45
46#define spcl u_spcl.s_spcl
8959d9ce 47
8959d9ce
KM
48#define DUMPOUTFMT "%-16s %c %s" /* for printf */
49 /* name, incno, ctime(date) */
50#define DUMPINFMT "%16s %c %[^\n]\n" /* inverse for scanf */