xref: /onnv-gate/usr/src/cmd/backup/dump/dump.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * Copyright 1996, 1998, 2000, 2002-2003 Sun Microsystems, Inc.
3*0Sstevel@tonic-gate  * All rights reserved.
4*0Sstevel@tonic-gate  * Use is subject to license terms.
5*0Sstevel@tonic-gate  */
6*0Sstevel@tonic-gate 
7*0Sstevel@tonic-gate /*
8*0Sstevel@tonic-gate  * Copyright (c) 1980 Regents of the University of California.
9*0Sstevel@tonic-gate  * All rights reserved. The Berkeley software License Agreement
10*0Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
11*0Sstevel@tonic-gate  */
12*0Sstevel@tonic-gate 
13*0Sstevel@tonic-gate #ifndef _DUMP_H
14*0Sstevel@tonic-gate #define	_DUMP_H
15*0Sstevel@tonic-gate 
16*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
17*0Sstevel@tonic-gate 
18*0Sstevel@tonic-gate #include <stdio.h>
19*0Sstevel@tonic-gate #include <locale.h>
20*0Sstevel@tonic-gate #include <sys/types.h>
21*0Sstevel@tonic-gate #include <ctype.h>
22*0Sstevel@tonic-gate #include <string.h>
23*0Sstevel@tonic-gate #include <syslog.h>
24*0Sstevel@tonic-gate #include <errno.h>
25*0Sstevel@tonic-gate #include <fcntl.h>
26*0Sstevel@tonic-gate #include <utmpx.h>
27*0Sstevel@tonic-gate #include <signal.h>
28*0Sstevel@tonic-gate #include <stdlib.h>
29*0Sstevel@tonic-gate #include <time.h>
30*0Sstevel@tonic-gate #include <sys/param.h>	/* for MAXBSIZE */
31*0Sstevel@tonic-gate #include <sys/stat.h>
32*0Sstevel@tonic-gate #include <sys/time.h>
33*0Sstevel@tonic-gate #include <sys/wait.h>
34*0Sstevel@tonic-gate #include <sys/vnode.h>	/* needed by inode.h */
35*0Sstevel@tonic-gate #include <setjmp.h>
36*0Sstevel@tonic-gate #include <sys/mman.h>
37*0Sstevel@tonic-gate #include <assert.h>
38*0Sstevel@tonic-gate #include <dumpusg.h>
39*0Sstevel@tonic-gate #include <kstat.h>
40*0Sstevel@tonic-gate #include <sys/fssnap_if.h>
41*0Sstevel@tonic-gate #include <libgen.h>
42*0Sstevel@tonic-gate #include <limits.h>
43*0Sstevel@tonic-gate 
44*0Sstevel@tonic-gate #ifdef	__cplusplus
45*0Sstevel@tonic-gate extern "C" {
46*0Sstevel@tonic-gate #endif
47*0Sstevel@tonic-gate 
48*0Sstevel@tonic-gate #define	SUPPORTS_MTB_TAPE_FORMAT
49*0Sstevel@tonic-gate #include <protocols/dumprestore.h>
50*0Sstevel@tonic-gate #include <memutils.h>
51*0Sstevel@tonic-gate #include <note.h>
52*0Sstevel@tonic-gate 
53*0Sstevel@tonic-gate #define	NI		16
54*0Sstevel@tonic-gate #define	MAXINOPB	(MAXBSIZE / sizeof (struct dinode))
55*0Sstevel@tonic-gate #define	MAXNINDIR	(MAXBSIZE / sizeof (daddr32_t))
56*0Sstevel@tonic-gate 
57*0Sstevel@tonic-gate #ifndef roundup
58*0Sstevel@tonic-gate #define	roundup(x, y)	((((x)+((y)-1))/(y))*(y))
59*0Sstevel@tonic-gate #endif
60*0Sstevel@tonic-gate #ifndef MIN
61*0Sstevel@tonic-gate #define	MIN(a, b)	(((a) < (b)) ? (a) : (b))
62*0Sstevel@tonic-gate #endif
63*0Sstevel@tonic-gate #ifndef MAX
64*0Sstevel@tonic-gate #define	MAX(a, b)	(((a) > (b)) ? (a) : (b))
65*0Sstevel@tonic-gate #endif
66*0Sstevel@tonic-gate 
67*0Sstevel@tonic-gate /*
68*0Sstevel@tonic-gate  * Define an overflow-free version of howmany so that we don't
69*0Sstevel@tonic-gate  * run into trouble with large files.
70*0Sstevel@tonic-gate  */
71*0Sstevel@tonic-gate #define	d_howmany(x, y)	((x) / (y) + ((x) % (y) != 0))
72*0Sstevel@tonic-gate 
73*0Sstevel@tonic-gate #define	MWORD(m, i)	(m[(ino_t)(i-1)/NBBY])
74*0Sstevel@tonic-gate #define	MBIT(i)		((1<<((ino_t)(i-1)%NBBY))&0xff)
75*0Sstevel@tonic-gate #define	BIS(i, w)	(MWORD(w, i) |= MBIT(i))
76*0Sstevel@tonic-gate #define	BIC(i, w)	(MWORD(w, i) &= ~MBIT(i))
77*0Sstevel@tonic-gate #define	BIT(i, w)	(MWORD(w, i) & MBIT(i))
78*0Sstevel@tonic-gate 
79*0Sstevel@tonic-gate uint_t	msiz;
80*0Sstevel@tonic-gate uchar_t	*clrmap;
81*0Sstevel@tonic-gate uchar_t	*dirmap;
82*0Sstevel@tonic-gate uchar_t	*filmap;
83*0Sstevel@tonic-gate uchar_t	*nodmap;
84*0Sstevel@tonic-gate uchar_t	*shamap;
85*0Sstevel@tonic-gate uchar_t	*activemap;
86*0Sstevel@tonic-gate 
87*0Sstevel@tonic-gate /*
88*0Sstevel@tonic-gate  *	All calculations done in 0.1" units!
89*0Sstevel@tonic-gate  */
90*0Sstevel@tonic-gate 
91*0Sstevel@tonic-gate char	*disk;		/* name of the disk file */
92*0Sstevel@tonic-gate char	*dname;		/* name to put in /etc/dumpdates */
93*0Sstevel@tonic-gate int	disk_dynamic;	/* true if disk refers to dynamic storage */
94*0Sstevel@tonic-gate char	*tape;		/* name of the tape file */
95*0Sstevel@tonic-gate char	*host;		/* name of the remote tape host (may be "user@host") */
96*0Sstevel@tonic-gate char	*dumpdev;	/* hostname:device for current volume */
97*0Sstevel@tonic-gate char	*sdumpdev;	/* short form of dumpdev (no user name if remote) */
98*0Sstevel@tonic-gate char	*increm;	/* name of file containing incremental information */
99*0Sstevel@tonic-gate char	*filesystem;	/* name of the file system */
100*0Sstevel@tonic-gate char	*myname;	/* argv[0] without leading path components */
101*0Sstevel@tonic-gate char	lastincno;	/* increment number of previous dump */
102*0Sstevel@tonic-gate char	incno;		/* increment number */
103*0Sstevel@tonic-gate char	*tlabel;	/* what goes in tape header c_label field */
104*0Sstevel@tonic-gate int	uflag;		/* update flag */
105*0Sstevel@tonic-gate int	fi;		/* disk file descriptor */
106*0Sstevel@tonic-gate int	to;		/* tape file descriptor */
107*0Sstevel@tonic-gate int	mapfd;		/* block disk device descriptor for mmap */
108*0Sstevel@tonic-gate int	pipeout;	/* true => output to standard output */
109*0Sstevel@tonic-gate int	tapeout;	/* true => output to a tape drive */
110*0Sstevel@tonic-gate ino_t	ino;		/* current inumber; used globally */
111*0Sstevel@tonic-gate off_t	pos;		/* starting offset within ino; used globally */
112*0Sstevel@tonic-gate int	leftover;	/* number of tape recs left over from prev vol */
113*0Sstevel@tonic-gate int	nsubdir;	/* counts subdirs, for deciding to dump a dir */
114*0Sstevel@tonic-gate int	newtape;	/* new tape flag */
115*0Sstevel@tonic-gate int	nadded;		/* number of added sub directories */
116*0Sstevel@tonic-gate int	dadded;		/* directory added flag */
117*0Sstevel@tonic-gate int	density;	/* density in 0.1" units */
118*0Sstevel@tonic-gate ulong_t	tsize;		/* tape size in 0.1" units */
119*0Sstevel@tonic-gate u_offset_t esize;	/* estimated tape size, blocks */
120*0Sstevel@tonic-gate u_offset_t o_esize;	/* number of header blocks (overhead) */
121*0Sstevel@tonic-gate u_offset_t f_esize;	/* number of TP_BSIZE blocks for files/maps */
122*0Sstevel@tonic-gate uint_t	etapes;		/* estimated number of tapes */
123*0Sstevel@tonic-gate uint_t	ntrec;		/* 1K records per tape block */
124*0Sstevel@tonic-gate int	tenthsperirg;	/* 1/10" per tape inter-record gap */
125*0Sstevel@tonic-gate dev_t 	partial_dev;	/* id of BLOCK device used in partial mode */
126*0Sstevel@tonic-gate pid_t	dumppid;	/* process-ID of top-level process */
127*0Sstevel@tonic-gate 
128*0Sstevel@tonic-gate int	verify;		/* verify each volume */
129*0Sstevel@tonic-gate int	doingverify;	/* true => doing a verify pass */
130*0Sstevel@tonic-gate int	active;		/* recopy active files */
131*0Sstevel@tonic-gate int	doingactive;	/* true => redumping active files */
132*0Sstevel@tonic-gate int	archive;	/* true => saving a archive in archivefile */
133*0Sstevel@tonic-gate char	*archivefile;	/* name of archivefile */
134*0Sstevel@tonic-gate int	notify;		/* notify operator flag */
135*0Sstevel@tonic-gate int	diskette;	/* true if dumping to a diskette */
136*0Sstevel@tonic-gate int	cartridge;	/* true if dumping to a cartridge tape */
137*0Sstevel@tonic-gate uint_t	tracks;		/* number of tracks on a cartridge tape */
138*0Sstevel@tonic-gate int	printsize;	/* just print estimated size and exit */
139*0Sstevel@tonic-gate int	offline;	/* take tape offline after rewinding */
140*0Sstevel@tonic-gate int	autoload;	/* wait for next tape to autoload; implies offline */
141*0Sstevel@tonic-gate int	autoload_tries;	/* number of times to check on autoload */
142*0Sstevel@tonic-gate int	autoload_period; /* seconds, tries*period = total wait time */
143*0Sstevel@tonic-gate int	doposition;	/* move to specified... */
144*0Sstevel@tonic-gate daddr32_t filenum;	/* position of dump on 1st volume */
145*0Sstevel@tonic-gate int	dumpstate;	/* dump output state (see below) */
146*0Sstevel@tonic-gate int	dumptoarchive;	/* mark records to be archived */
147*0Sstevel@tonic-gate 
148*0Sstevel@tonic-gate int	blockswritten;	/* number of blocks written on current tape */
149*0Sstevel@tonic-gate uint_t	tapeno;		/* current tape number */
150*0Sstevel@tonic-gate 
151*0Sstevel@tonic-gate struct fs *sblock;	/* the file system super block */
152*0Sstevel@tonic-gate int	shortmeta;	/* current file has small amount of metadata */
153*0Sstevel@tonic-gate union u_shadow c_shadow_save[1];
154*0Sstevel@tonic-gate 
155*0Sstevel@tonic-gate time_t	*telapsed;	/* time spent writing previous tapes */
156*0Sstevel@tonic-gate time_t	*tstart_writing; /* when we started writing the latest tape */
157*0Sstevel@tonic-gate time_t	*tschedule;	/* when next to give a remaining-time estimate */
158*0Sstevel@tonic-gate 
159*0Sstevel@tonic-gate char	*debug_chdir;	/* non-NULL means to mkdir this/pid, and chdir there, */
160*0Sstevel@tonic-gate 			/* once for each separate child */
161*0Sstevel@tonic-gate 
162*0Sstevel@tonic-gate /*
163*0Sstevel@tonic-gate  * Defines for the msec part of
164*0Sstevel@tonic-gate  * inode-based times, since we're
165*0Sstevel@tonic-gate  * not part of the kernel.
166*0Sstevel@tonic-gate  */
167*0Sstevel@tonic-gate #define	di_atspare	di_ic.ic_atspare
168*0Sstevel@tonic-gate #define	di_mtspare	di_ic.ic_mtspare
169*0Sstevel@tonic-gate #define	di_ctspare	di_ic.ic_ctspare
170*0Sstevel@tonic-gate 
171*0Sstevel@tonic-gate #define	HOUR	(60L*60L)
172*0Sstevel@tonic-gate #define	DAY	(24L*HOUR)
173*0Sstevel@tonic-gate #define	YEAR	(365L*DAY)
174*0Sstevel@tonic-gate 
175*0Sstevel@tonic-gate /*
176*0Sstevel@tonic-gate  *	Dump output states
177*0Sstevel@tonic-gate  */
178*0Sstevel@tonic-gate #define	DS_INIT		0
179*0Sstevel@tonic-gate #define	DS_START	1
180*0Sstevel@tonic-gate #define	DS_CLRI		2
181*0Sstevel@tonic-gate #define	DS_BITS		3
182*0Sstevel@tonic-gate #define	DS_DIRS		4
183*0Sstevel@tonic-gate #define	DS_FILES	5
184*0Sstevel@tonic-gate #define	DS_END		6
185*0Sstevel@tonic-gate #define	DS_DONE		7
186*0Sstevel@tonic-gate 
187*0Sstevel@tonic-gate /*
188*0Sstevel@tonic-gate  *	Exit status codes
189*0Sstevel@tonic-gate  */
190*0Sstevel@tonic-gate #define	X_FINOK		0	/* normal exit */
191*0Sstevel@tonic-gate #define	X_REWRITE	2	/* restart writing from the check point */
192*0Sstevel@tonic-gate #define	X_ABORT		3	/* abort all of dump; no checkpoint restart */
193*0Sstevel@tonic-gate #define	X_VERIFY	4	/* verify the reel just written */
194*0Sstevel@tonic-gate #define	X_RESTART	5	/* abort all progress so far; attempt restart */
195*0Sstevel@tonic-gate 
196*0Sstevel@tonic-gate #define	NINCREM	"/etc/dumpdates"	/* new format incremental info */
197*0Sstevel@tonic-gate 
198*0Sstevel@tonic-gate #define	TAPE	"/dev/rmt/0b"		/* default tape device */
199*0Sstevel@tonic-gate #define	OPGRENT	"sys"			/* group entry to notify */
200*0Sstevel@tonic-gate #define	DIALUP	"ttyd"			/* prefix for dialups */
201*0Sstevel@tonic-gate 
202*0Sstevel@tonic-gate #define	DISKETTE	"/dev/rfd0c"
203*0Sstevel@tonic-gate 
204*0Sstevel@tonic-gate #define	NBUF		64		/* number of output buffers */
205*0Sstevel@tonic-gate #define	MAXNTREC	256		/* max tape blocking factor (in Kb) */
206*0Sstevel@tonic-gate 
207*0Sstevel@tonic-gate /*
208*0Sstevel@tonic-gate  *	The contents of the file NINCREM are maintained both on
209*0Sstevel@tonic-gate  *	a linked list and then (eventually) arrayified.
210*0Sstevel@tonic-gate  */
211*0Sstevel@tonic-gate struct	idates {
212*0Sstevel@tonic-gate 	char	id_name[MAXNAMLEN+3];
213*0Sstevel@tonic-gate 	char	id_incno;
214*0Sstevel@tonic-gate 	time32_t id_ddate;
215*0Sstevel@tonic-gate };
216*0Sstevel@tonic-gate 
217*0Sstevel@tonic-gate size_t	nidates;		/* number of records (might be zero) */
218*0Sstevel@tonic-gate struct	idates	**idatev;	/* the arrayfied version */
219*0Sstevel@tonic-gate #define	ITITERATE(i, ip)	\
220*0Sstevel@tonic-gate 	for (i = 0; i < nidates && (ip = idatev[i]) != NULL; i++)
221*0Sstevel@tonic-gate 
222*0Sstevel@tonic-gate /*
223*0Sstevel@tonic-gate  * Function declarations
224*0Sstevel@tonic-gate  */
225*0Sstevel@tonic-gate #ifdef __STDC__
226*0Sstevel@tonic-gate /*
227*0Sstevel@tonic-gate  * dumpfstab.c
228*0Sstevel@tonic-gate  */
229*0Sstevel@tonic-gate extern void mnttabread(void);
230*0Sstevel@tonic-gate extern struct mntent *mnttabsearch(char *, int);
231*0Sstevel@tonic-gate extern void setmnttab(void);
232*0Sstevel@tonic-gate extern struct mntent *getmnttab(void);
233*0Sstevel@tonic-gate /*
234*0Sstevel@tonic-gate  * dumpitime.c
235*0Sstevel@tonic-gate  */
236*0Sstevel@tonic-gate extern char *prdate(time_t);
237*0Sstevel@tonic-gate extern void inititimes(void);
238*0Sstevel@tonic-gate extern void getitime(void);
239*0Sstevel@tonic-gate extern void putitime(void);
240*0Sstevel@tonic-gate extern void est(struct dinode *);
241*0Sstevel@tonic-gate extern time32_t is_fssnap_dump(char *);
242*0Sstevel@tonic-gate extern void bmapest(uchar_t *);
243*0Sstevel@tonic-gate /*
244*0Sstevel@tonic-gate  * dumplabel.c
245*0Sstevel@tonic-gate  */
246*0Sstevel@tonic-gate extern void getlabel(void);
247*0Sstevel@tonic-gate /*
248*0Sstevel@tonic-gate  * dumpmain.c
249*0Sstevel@tonic-gate  */
250*0Sstevel@tonic-gate extern void child_chdir(void);
251*0Sstevel@tonic-gate extern char *unrawname(char *);
252*0Sstevel@tonic-gate extern void sigAbort(int);
253*0Sstevel@tonic-gate extern char *rawname(char *);
254*0Sstevel@tonic-gate extern char *lf_rawname(char *);
255*0Sstevel@tonic-gate extern time32_t timeclock(time32_t);
256*0Sstevel@tonic-gate #ifdef signal
257*0Sstevel@tonic-gate extern void (*nsignal(int, void (*)(int)))(int);
258*0Sstevel@tonic-gate #endif
259*0Sstevel@tonic-gate extern int safe_file_open(const char *file, int mode, int perms);
260*0Sstevel@tonic-gate extern int safe_device_open(const char *file, int mode, int perms);
261*0Sstevel@tonic-gate extern FILE *safe_fopen(const char *filename, const char *smode, int perms);
262*0Sstevel@tonic-gate /*
263*0Sstevel@tonic-gate  * dumponline.c
264*0Sstevel@tonic-gate  */
265*0Sstevel@tonic-gate extern void allocino(void);
266*0Sstevel@tonic-gate extern void freeino(void);
267*0Sstevel@tonic-gate extern void saveino(ino_t, struct dinode *);
268*0Sstevel@tonic-gate extern void resetino(ino_t);
269*0Sstevel@tonic-gate extern long getigen(ino_t);
270*0Sstevel@tonic-gate extern int lf_ismounted(char *, char *);
271*0Sstevel@tonic-gate extern int isoperator(uid_t, gid_t);
272*0Sstevel@tonic-gate extern int lockfs(char *, char *);
273*0Sstevel@tonic-gate extern int openi(ino_t, long, char *);
274*0Sstevel@tonic-gate extern caddr_t mapfile(int, off_t, off_t, int);
275*0Sstevel@tonic-gate extern void unmapfile(void);
276*0Sstevel@tonic-gate extern void stattoi(struct stat *, struct dinode *);
277*0Sstevel@tonic-gate extern void dumpfile(int, caddr_t, off_t, off_t, off_t, int, int);
278*0Sstevel@tonic-gate extern void activepass(void);
279*0Sstevel@tonic-gate /*
280*0Sstevel@tonic-gate  * dumpoptr.c
281*0Sstevel@tonic-gate  */
282*0Sstevel@tonic-gate extern int query(char *);
283*0Sstevel@tonic-gate extern int query_once(char *, int);
284*0Sstevel@tonic-gate extern void interrupt(int);
285*0Sstevel@tonic-gate extern void broadcast(char *);
286*0Sstevel@tonic-gate extern void timeest(int, int);
287*0Sstevel@tonic-gate /*PRINTFLIKE1*/
288*0Sstevel@tonic-gate extern void msg(const char *, ...);
289*0Sstevel@tonic-gate /*PRINTFLIKE1*/
290*0Sstevel@tonic-gate extern void msgtail(const char *, ...);
291*0Sstevel@tonic-gate extern void lastdump(int);
292*0Sstevel@tonic-gate extern char *getresponse(char *, char *);
293*0Sstevel@tonic-gate /*
294*0Sstevel@tonic-gate  * dumptape.c
295*0Sstevel@tonic-gate  */
296*0Sstevel@tonic-gate extern void alloctape(void);
297*0Sstevel@tonic-gate extern void reset(void);
298*0Sstevel@tonic-gate extern void spclrec(void);
299*0Sstevel@tonic-gate extern void taprec(uchar_t *, int, int);
300*0Sstevel@tonic-gate extern void dmpblk(daddr32_t, size_t, off_t);
301*0Sstevel@tonic-gate extern void toslave(void (*)(ino_t), ino_t);
302*0Sstevel@tonic-gate extern void doinode(ino_t);
303*0Sstevel@tonic-gate extern void dospcl(ino_t);
304*0Sstevel@tonic-gate extern void flushcmds(void);
305*0Sstevel@tonic-gate extern void flusht(void);
306*0Sstevel@tonic-gate extern void nextdevice(void);
307*0Sstevel@tonic-gate extern int isrewind(int);
308*0Sstevel@tonic-gate extern void trewind(void);
309*0Sstevel@tonic-gate extern void close_rewind(void);
310*0Sstevel@tonic-gate extern void changevol(void);
311*0Sstevel@tonic-gate extern void otape(int);
312*0Sstevel@tonic-gate extern void dumpabort(void);
313*0Sstevel@tonic-gate extern void dumpailing(void);
314*0Sstevel@tonic-gate extern void Exit(int);
315*0Sstevel@tonic-gate extern void positiontape(char *);
316*0Sstevel@tonic-gate /*
317*0Sstevel@tonic-gate  * dumptraverse.c
318*0Sstevel@tonic-gate  */
319*0Sstevel@tonic-gate extern void pass(void (*)(struct dinode *), uchar_t *);
320*0Sstevel@tonic-gate extern void mark(struct dinode *);
321*0Sstevel@tonic-gate extern void active_mark(struct dinode *);
322*0Sstevel@tonic-gate extern void markshad(struct dinode *);
323*0Sstevel@tonic-gate extern void estshad(struct dinode *);
324*0Sstevel@tonic-gate extern void freeshad();
325*0Sstevel@tonic-gate extern void add(struct dinode *);
326*0Sstevel@tonic-gate extern void dirdump(struct dinode *);
327*0Sstevel@tonic-gate extern void dump(struct dinode *);
328*0Sstevel@tonic-gate extern void lf_dump(struct dinode *);
329*0Sstevel@tonic-gate extern void dumpblocks(ino_t);
330*0Sstevel@tonic-gate extern void bitmap(uchar_t *, int);
331*0Sstevel@tonic-gate extern struct dinode *getino(ino_t);
332*0Sstevel@tonic-gate extern void bread(diskaddr_t, uchar_t *, size_t);
333*0Sstevel@tonic-gate extern int hasshortmeta(struct dinode **ip);
334*0Sstevel@tonic-gate /*
335*0Sstevel@tonic-gate  * lftw.c
336*0Sstevel@tonic-gate  */
337*0Sstevel@tonic-gate extern int lftw(const char *,
338*0Sstevel@tonic-gate 	int (*)(const char *, const struct stat *, int), int);
339*0Sstevel@tonic-gate extern int lf_lftw(const char *,
340*0Sstevel@tonic-gate 	int (*)(const char *, const struct stat64 *, int), int);
341*0Sstevel@tonic-gate /*
342*0Sstevel@tonic-gate  * partial.c
343*0Sstevel@tonic-gate  */
344*0Sstevel@tonic-gate extern void partial_check(void);
345*0Sstevel@tonic-gate extern void lf_partial_check(void);
346*0Sstevel@tonic-gate extern int partial_mark(int, char **);
347*0Sstevel@tonic-gate /*
348*0Sstevel@tonic-gate  * unctime.c
349*0Sstevel@tonic-gate  */
350*0Sstevel@tonic-gate extern time_t unctime(char *);
351*0Sstevel@tonic-gate #else	/* !STDC */
352*0Sstevel@tonic-gate /*
353*0Sstevel@tonic-gate  * dumpfstab.c
354*0Sstevel@tonic-gate  */
355*0Sstevel@tonic-gate extern void mnttabread();
356*0Sstevel@tonic-gate extern struct mntent *mnttabsearch();
357*0Sstevel@tonic-gate extern void setmnttab();
358*0Sstevel@tonic-gate extern struct mntent *getmnttab();
359*0Sstevel@tonic-gate /*
360*0Sstevel@tonic-gate  * dumpitime.c
361*0Sstevel@tonic-gate  */
362*0Sstevel@tonic-gate extern char *prdate();
363*0Sstevel@tonic-gate extern void inititimes();
364*0Sstevel@tonic-gate extern void getitime();
365*0Sstevel@tonic-gate extern void putitime();
366*0Sstevel@tonic-gate extern void est();
367*0Sstevel@tonic-gate extern time32_t is_fssnap_dump();
368*0Sstevel@tonic-gate extern void bmapest();
369*0Sstevel@tonic-gate /*
370*0Sstevel@tonic-gate  * dumplabel.c
371*0Sstevel@tonic-gate  */
372*0Sstevel@tonic-gate extern void getlabel();
373*0Sstevel@tonic-gate /*
374*0Sstevel@tonic-gate  * dumpmain.c
375*0Sstevel@tonic-gate  */
376*0Sstevel@tonic-gate extern void child_chdir();
377*0Sstevel@tonic-gate extern char *unrawname();
378*0Sstevel@tonic-gate extern void sigAbort();
379*0Sstevel@tonic-gate extern char *rawname();
380*0Sstevel@tonic-gate extern char *lf_rawname();
381*0Sstevel@tonic-gate extern time_t timeclock();
382*0Sstevel@tonic-gate #ifdef signal
383*0Sstevel@tonic-gate extern void nsignal();
384*0Sstevel@tonic-gate #endif
385*0Sstevel@tonic-gate extern int safe_file_open();
386*0Sstevel@tonic-gate extern int safe_device_open();
387*0Sstevel@tonic-gate extern FILE *safe_fopen();
388*0Sstevel@tonic-gate /*
389*0Sstevel@tonic-gate  * dumponline.c
390*0Sstevel@tonic-gate  */
391*0Sstevel@tonic-gate extern void allocino();
392*0Sstevel@tonic-gate extern void freeino();
393*0Sstevel@tonic-gate extern void saveino();
394*0Sstevel@tonic-gate extern void resetino();
395*0Sstevel@tonic-gate extern long getigen();
396*0Sstevel@tonic-gate extern int lf_ismounted();
397*0Sstevel@tonic-gate extern int isoperator();
398*0Sstevel@tonic-gate extern ulong_t lockfs();
399*0Sstevel@tonic-gate extern int openi();
400*0Sstevel@tonic-gate extern caddr_t mapfile();
401*0Sstevel@tonic-gate extern void unmapfile();
402*0Sstevel@tonic-gate extern void stattoi();
403*0Sstevel@tonic-gate extern void dumpfile();
404*0Sstevel@tonic-gate extern void activepass();
405*0Sstevel@tonic-gate /*
406*0Sstevel@tonic-gate  * dumpoptr.c
407*0Sstevel@tonic-gate  */
408*0Sstevel@tonic-gate extern int query();
409*0Sstevel@tonic-gate extern int query_once();
410*0Sstevel@tonic-gate extern void interrupt();
411*0Sstevel@tonic-gate extern void broadcast();
412*0Sstevel@tonic-gate extern void timeest();
413*0Sstevel@tonic-gate extern void msg();
414*0Sstevel@tonic-gate extern void msgtail();
415*0Sstevel@tonic-gate extern void lastdump();
416*0Sstevel@tonic-gate extern char *getresponse();
417*0Sstevel@tonic-gate /*
418*0Sstevel@tonic-gate  * dumptape.c
419*0Sstevel@tonic-gate  */
420*0Sstevel@tonic-gate extern void alloctape();
421*0Sstevel@tonic-gate extern void reset();
422*0Sstevel@tonic-gate extern void spclrec();
423*0Sstevel@tonic-gate extern void taprec();
424*0Sstevel@tonic-gate extern void dmpblk();
425*0Sstevel@tonic-gate extern void toslave();
426*0Sstevel@tonic-gate extern void doinode();
427*0Sstevel@tonic-gate extern void dospcl();
428*0Sstevel@tonic-gate extern void flushcmds();
429*0Sstevel@tonic-gate extern void flusht();
430*0Sstevel@tonic-gate extern void nextdevice();
431*0Sstevel@tonic-gate extern int isrewind();
432*0Sstevel@tonic-gate extern void trewind();
433*0Sstevel@tonic-gate extern void close_rewind();
434*0Sstevel@tonic-gate extern void changevol();
435*0Sstevel@tonic-gate extern void otape();
436*0Sstevel@tonic-gate extern void dumpabort();
437*0Sstevel@tonic-gate extern void dumpailing();
438*0Sstevel@tonic-gate extern void Exit();
439*0Sstevel@tonic-gate extern void positiontape();
440*0Sstevel@tonic-gate /*
441*0Sstevel@tonic-gate  * dumptraverse.c
442*0Sstevel@tonic-gate  */
443*0Sstevel@tonic-gate extern void pass();
444*0Sstevel@tonic-gate extern void mark();
445*0Sstevel@tonic-gate extern void active_mark();
446*0Sstevel@tonic-gate extern void markshad();
447*0Sstevel@tonic-gate extern void estshad();
448*0Sstevel@tonic-gate extern void freeshad();
449*0Sstevel@tonic-gate extern void add();
450*0Sstevel@tonic-gate extern void dirdump();
451*0Sstevel@tonic-gate extern void dump();
452*0Sstevel@tonic-gate extern void lf_dump();
453*0Sstevel@tonic-gate extern void dumpblocks();
454*0Sstevel@tonic-gate extern void bitmap();
455*0Sstevel@tonic-gate extern struct dinode *getino();
456*0Sstevel@tonic-gate extern void bread();
457*0Sstevel@tonic-gate extern int hasshortmeta();
458*0Sstevel@tonic-gate /*
459*0Sstevel@tonic-gate  * lftw.c
460*0Sstevel@tonic-gate  */
461*0Sstevel@tonic-gate extern int lftw();
462*0Sstevel@tonic-gate extern int lf_lftw();
463*0Sstevel@tonic-gate /*
464*0Sstevel@tonic-gate  * partial.c
465*0Sstevel@tonic-gate  */
466*0Sstevel@tonic-gate extern void partial_check();
467*0Sstevel@tonic-gate extern void lf_partial_check();
468*0Sstevel@tonic-gate extern int partial_mark();
469*0Sstevel@tonic-gate /*
470*0Sstevel@tonic-gate  * unctime.c
471*0Sstevel@tonic-gate  */
472*0Sstevel@tonic-gate extern time_t unctime();
473*0Sstevel@tonic-gate #endif /* __STDC__ */
474*0Sstevel@tonic-gate 
475*0Sstevel@tonic-gate /* Insufficiently-featureful system header files... */
476*0Sstevel@tonic-gate NOTE(ALIGNMENT(mmap, 8))
477*0Sstevel@tonic-gate 
478*0Sstevel@tonic-gate 
479*0Sstevel@tonic-gate #ifdef	__cplusplus
480*0Sstevel@tonic-gate }
481*0Sstevel@tonic-gate #endif
482*0Sstevel@tonic-gate 
483*0Sstevel@tonic-gate #endif /* _DUMP_H */
484