xref: /onnv-gate/usr/src/cmd/backup/dump/dump.h (revision 9563:bc766da84146)
10Sstevel@tonic-gate /*
2*9563SJim.Rice@Sun.COM  * CDDL HEADER START
3*9563SJim.Rice@Sun.COM  *
4*9563SJim.Rice@Sun.COM  * The contents of this file are subject to the terms of the
5*9563SJim.Rice@Sun.COM  * Common Development and Distribution License (the "License").
6*9563SJim.Rice@Sun.COM  * You may not use this file except in compliance with the License.
7*9563SJim.Rice@Sun.COM  *
8*9563SJim.Rice@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*9563SJim.Rice@Sun.COM  * or http://www.opensolaris.org/os/licensing.
10*9563SJim.Rice@Sun.COM  * See the License for the specific language governing permissions
11*9563SJim.Rice@Sun.COM  * and limitations under the License.
12*9563SJim.Rice@Sun.COM  *
13*9563SJim.Rice@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*9563SJim.Rice@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*9563SJim.Rice@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
16*9563SJim.Rice@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
17*9563SJim.Rice@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
18*9563SJim.Rice@Sun.COM  *
19*9563SJim.Rice@Sun.COM  * CDDL HEADER END
20*9563SJim.Rice@Sun.COM  */
21*9563SJim.Rice@Sun.COM /*
22*9563SJim.Rice@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate /*
270Sstevel@tonic-gate  * Copyright (c) 1980 Regents of the University of California.
280Sstevel@tonic-gate  * All rights reserved. The Berkeley software License Agreement
290Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
300Sstevel@tonic-gate  */
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #ifndef _DUMP_H
330Sstevel@tonic-gate #define	_DUMP_H
340Sstevel@tonic-gate 
350Sstevel@tonic-gate #include <stdio.h>
360Sstevel@tonic-gate #include <locale.h>
370Sstevel@tonic-gate #include <sys/types.h>
380Sstevel@tonic-gate #include <ctype.h>
390Sstevel@tonic-gate #include <string.h>
400Sstevel@tonic-gate #include <syslog.h>
410Sstevel@tonic-gate #include <errno.h>
420Sstevel@tonic-gate #include <fcntl.h>
430Sstevel@tonic-gate #include <utmpx.h>
440Sstevel@tonic-gate #include <signal.h>
450Sstevel@tonic-gate #include <stdlib.h>
460Sstevel@tonic-gate #include <time.h>
470Sstevel@tonic-gate #include <sys/param.h>	/* for MAXBSIZE */
480Sstevel@tonic-gate #include <sys/stat.h>
490Sstevel@tonic-gate #include <sys/time.h>
500Sstevel@tonic-gate #include <sys/wait.h>
510Sstevel@tonic-gate #include <sys/vnode.h>	/* needed by inode.h */
520Sstevel@tonic-gate #include <setjmp.h>
530Sstevel@tonic-gate #include <sys/mman.h>
540Sstevel@tonic-gate #include <assert.h>
550Sstevel@tonic-gate #include <dumpusg.h>
560Sstevel@tonic-gate #include <kstat.h>
570Sstevel@tonic-gate #include <sys/fssnap_if.h>
580Sstevel@tonic-gate #include <libgen.h>
590Sstevel@tonic-gate #include <limits.h>
600Sstevel@tonic-gate 
610Sstevel@tonic-gate #ifdef	__cplusplus
620Sstevel@tonic-gate extern "C" {
630Sstevel@tonic-gate #endif
640Sstevel@tonic-gate 
650Sstevel@tonic-gate #define	SUPPORTS_MTB_TAPE_FORMAT
660Sstevel@tonic-gate #include <protocols/dumprestore.h>
670Sstevel@tonic-gate #include <memutils.h>
680Sstevel@tonic-gate #include <note.h>
690Sstevel@tonic-gate 
700Sstevel@tonic-gate #define	NI		16
710Sstevel@tonic-gate #define	MAXINOPB	(MAXBSIZE / sizeof (struct dinode))
720Sstevel@tonic-gate #define	MAXNINDIR	(MAXBSIZE / sizeof (daddr32_t))
730Sstevel@tonic-gate 
740Sstevel@tonic-gate #ifndef roundup
750Sstevel@tonic-gate #define	roundup(x, y)	((((x)+((y)-1))/(y))*(y))
760Sstevel@tonic-gate #endif
770Sstevel@tonic-gate #ifndef MIN
780Sstevel@tonic-gate #define	MIN(a, b)	(((a) < (b)) ? (a) : (b))
790Sstevel@tonic-gate #endif
800Sstevel@tonic-gate #ifndef MAX
810Sstevel@tonic-gate #define	MAX(a, b)	(((a) > (b)) ? (a) : (b))
820Sstevel@tonic-gate #endif
830Sstevel@tonic-gate 
840Sstevel@tonic-gate /*
850Sstevel@tonic-gate  * Define an overflow-free version of howmany so that we don't
860Sstevel@tonic-gate  * run into trouble with large files.
870Sstevel@tonic-gate  */
880Sstevel@tonic-gate #define	d_howmany(x, y)	((x) / (y) + ((x) % (y) != 0))
890Sstevel@tonic-gate 
900Sstevel@tonic-gate #define	MWORD(m, i)	(m[(ino_t)(i-1)/NBBY])
910Sstevel@tonic-gate #define	MBIT(i)		((1<<((ino_t)(i-1)%NBBY))&0xff)
920Sstevel@tonic-gate #define	BIS(i, w)	(MWORD(w, i) |= MBIT(i))
930Sstevel@tonic-gate #define	BIC(i, w)	(MWORD(w, i) &= ~MBIT(i))
940Sstevel@tonic-gate #define	BIT(i, w)	(MWORD(w, i) & MBIT(i))
950Sstevel@tonic-gate 
960Sstevel@tonic-gate uint_t	msiz;
970Sstevel@tonic-gate uchar_t	*clrmap;
980Sstevel@tonic-gate uchar_t	*dirmap;
990Sstevel@tonic-gate uchar_t	*filmap;
1000Sstevel@tonic-gate uchar_t	*nodmap;
1010Sstevel@tonic-gate uchar_t	*shamap;
1020Sstevel@tonic-gate uchar_t	*activemap;
1030Sstevel@tonic-gate 
1040Sstevel@tonic-gate /*
1050Sstevel@tonic-gate  *	All calculations done in 0.1" units!
1060Sstevel@tonic-gate  */
1070Sstevel@tonic-gate 
1080Sstevel@tonic-gate char	*disk;		/* name of the disk file */
1090Sstevel@tonic-gate char	*dname;		/* name to put in /etc/dumpdates */
1100Sstevel@tonic-gate int	disk_dynamic;	/* true if disk refers to dynamic storage */
1110Sstevel@tonic-gate char	*tape;		/* name of the tape file */
1120Sstevel@tonic-gate char	*host;		/* name of the remote tape host (may be "user@host") */
1130Sstevel@tonic-gate char	*dumpdev;	/* hostname:device for current volume */
1140Sstevel@tonic-gate char	*sdumpdev;	/* short form of dumpdev (no user name if remote) */
1150Sstevel@tonic-gate char	*increm;	/* name of file containing incremental information */
1160Sstevel@tonic-gate char	*filesystem;	/* name of the file system */
1170Sstevel@tonic-gate char	*myname;	/* argv[0] without leading path components */
1180Sstevel@tonic-gate char	lastincno;	/* increment number of previous dump */
1190Sstevel@tonic-gate char	incno;		/* increment number */
1200Sstevel@tonic-gate char	*tlabel;	/* what goes in tape header c_label field */
1210Sstevel@tonic-gate int	uflag;		/* update flag */
1220Sstevel@tonic-gate int	fi;		/* disk file descriptor */
1230Sstevel@tonic-gate int	to;		/* tape file descriptor */
1240Sstevel@tonic-gate int	mapfd;		/* block disk device descriptor for mmap */
1250Sstevel@tonic-gate int	pipeout;	/* true => output to standard output */
1260Sstevel@tonic-gate int	tapeout;	/* true => output to a tape drive */
1270Sstevel@tonic-gate ino_t	ino;		/* current inumber; used globally */
1280Sstevel@tonic-gate off_t	pos;		/* starting offset within ino; used globally */
1290Sstevel@tonic-gate int	leftover;	/* number of tape recs left over from prev vol */
1300Sstevel@tonic-gate int	nsubdir;	/* counts subdirs, for deciding to dump a dir */
1310Sstevel@tonic-gate int	newtape;	/* new tape flag */
1320Sstevel@tonic-gate int	nadded;		/* number of added sub directories */
1330Sstevel@tonic-gate int	dadded;		/* directory added flag */
1340Sstevel@tonic-gate int	density;	/* density in 0.1" units */
1350Sstevel@tonic-gate ulong_t	tsize;		/* tape size in 0.1" units */
1360Sstevel@tonic-gate u_offset_t esize;	/* estimated tape size, blocks */
1370Sstevel@tonic-gate u_offset_t o_esize;	/* number of header blocks (overhead) */
1380Sstevel@tonic-gate u_offset_t f_esize;	/* number of TP_BSIZE blocks for files/maps */
1390Sstevel@tonic-gate uint_t	etapes;		/* estimated number of tapes */
1400Sstevel@tonic-gate uint_t	ntrec;		/* 1K records per tape block */
1410Sstevel@tonic-gate int	tenthsperirg;	/* 1/10" per tape inter-record gap */
1420Sstevel@tonic-gate dev_t 	partial_dev;	/* id of BLOCK device used in partial mode */
1430Sstevel@tonic-gate pid_t	dumppid;	/* process-ID of top-level process */
1440Sstevel@tonic-gate 
1450Sstevel@tonic-gate int	verify;		/* verify each volume */
1460Sstevel@tonic-gate int	doingverify;	/* true => doing a verify pass */
1470Sstevel@tonic-gate int	active;		/* recopy active files */
1480Sstevel@tonic-gate int	doingactive;	/* true => redumping active files */
1490Sstevel@tonic-gate int	archive;	/* true => saving a archive in archivefile */
1500Sstevel@tonic-gate char	*archivefile;	/* name of archivefile */
151*9563SJim.Rice@Sun.COM int	archive_opened;	/* have opened/created the archivefile */
1520Sstevel@tonic-gate int	notify;		/* notify operator flag */
1530Sstevel@tonic-gate int	diskette;	/* true if dumping to a diskette */
1540Sstevel@tonic-gate int	cartridge;	/* true if dumping to a cartridge tape */
1550Sstevel@tonic-gate uint_t	tracks;		/* number of tracks on a cartridge tape */
1560Sstevel@tonic-gate int	printsize;	/* just print estimated size and exit */
1570Sstevel@tonic-gate int	offline;	/* take tape offline after rewinding */
1580Sstevel@tonic-gate int	autoload;	/* wait for next tape to autoload; implies offline */
1590Sstevel@tonic-gate int	autoload_tries;	/* number of times to check on autoload */
1600Sstevel@tonic-gate int	autoload_period; /* seconds, tries*period = total wait time */
1610Sstevel@tonic-gate int	doposition;	/* move to specified... */
1620Sstevel@tonic-gate daddr32_t filenum;	/* position of dump on 1st volume */
1630Sstevel@tonic-gate int	dumpstate;	/* dump output state (see below) */
1640Sstevel@tonic-gate int	dumptoarchive;	/* mark records to be archived */
1650Sstevel@tonic-gate 
1660Sstevel@tonic-gate int	blockswritten;	/* number of blocks written on current tape */
1670Sstevel@tonic-gate uint_t	tapeno;		/* current tape number */
1680Sstevel@tonic-gate 
1690Sstevel@tonic-gate struct fs *sblock;	/* the file system super block */
1700Sstevel@tonic-gate int	shortmeta;	/* current file has small amount of metadata */
1710Sstevel@tonic-gate union u_shadow c_shadow_save[1];
1720Sstevel@tonic-gate 
1730Sstevel@tonic-gate time_t	*telapsed;	/* time spent writing previous tapes */
1740Sstevel@tonic-gate time_t	*tstart_writing; /* when we started writing the latest tape */
1750Sstevel@tonic-gate time_t	*tschedule;	/* when next to give a remaining-time estimate */
1760Sstevel@tonic-gate 
1770Sstevel@tonic-gate char	*debug_chdir;	/* non-NULL means to mkdir this/pid, and chdir there, */
1780Sstevel@tonic-gate 			/* once for each separate child */
1790Sstevel@tonic-gate 
1800Sstevel@tonic-gate /*
1810Sstevel@tonic-gate  * Defines for the msec part of
1820Sstevel@tonic-gate  * inode-based times, since we're
1830Sstevel@tonic-gate  * not part of the kernel.
1840Sstevel@tonic-gate  */
1850Sstevel@tonic-gate #define	di_atspare	di_ic.ic_atspare
1860Sstevel@tonic-gate #define	di_mtspare	di_ic.ic_mtspare
1870Sstevel@tonic-gate #define	di_ctspare	di_ic.ic_ctspare
1880Sstevel@tonic-gate 
1890Sstevel@tonic-gate #define	HOUR	(60L*60L)
1900Sstevel@tonic-gate #define	DAY	(24L*HOUR)
1910Sstevel@tonic-gate #define	YEAR	(365L*DAY)
1920Sstevel@tonic-gate 
1930Sstevel@tonic-gate /*
1940Sstevel@tonic-gate  *	Dump output states
1950Sstevel@tonic-gate  */
1960Sstevel@tonic-gate #define	DS_INIT		0
1970Sstevel@tonic-gate #define	DS_START	1
1980Sstevel@tonic-gate #define	DS_CLRI		2
1990Sstevel@tonic-gate #define	DS_BITS		3
2000Sstevel@tonic-gate #define	DS_DIRS		4
2010Sstevel@tonic-gate #define	DS_FILES	5
2020Sstevel@tonic-gate #define	DS_END		6
2030Sstevel@tonic-gate #define	DS_DONE		7
2040Sstevel@tonic-gate 
2050Sstevel@tonic-gate /*
2060Sstevel@tonic-gate  *	Exit status codes
2070Sstevel@tonic-gate  */
2080Sstevel@tonic-gate #define	X_FINOK		0	/* normal exit */
2090Sstevel@tonic-gate #define	X_REWRITE	2	/* restart writing from the check point */
2100Sstevel@tonic-gate #define	X_ABORT		3	/* abort all of dump; no checkpoint restart */
2110Sstevel@tonic-gate #define	X_VERIFY	4	/* verify the reel just written */
2120Sstevel@tonic-gate #define	X_RESTART	5	/* abort all progress so far; attempt restart */
2130Sstevel@tonic-gate 
2140Sstevel@tonic-gate #define	NINCREM	"/etc/dumpdates"	/* new format incremental info */
2150Sstevel@tonic-gate 
2160Sstevel@tonic-gate #define	TAPE	"/dev/rmt/0b"		/* default tape device */
2170Sstevel@tonic-gate #define	OPGRENT	"sys"			/* group entry to notify */
2180Sstevel@tonic-gate #define	DIALUP	"ttyd"			/* prefix for dialups */
2190Sstevel@tonic-gate 
2200Sstevel@tonic-gate #define	DISKETTE	"/dev/rfd0c"
2210Sstevel@tonic-gate 
2220Sstevel@tonic-gate #define	NBUF		64		/* number of output buffers */
2230Sstevel@tonic-gate #define	MAXNTREC	256		/* max tape blocking factor (in Kb) */
2240Sstevel@tonic-gate 
2250Sstevel@tonic-gate /*
2260Sstevel@tonic-gate  *	The contents of the file NINCREM are maintained both on
2270Sstevel@tonic-gate  *	a linked list and then (eventually) arrayified.
2280Sstevel@tonic-gate  */
2290Sstevel@tonic-gate struct	idates {
2300Sstevel@tonic-gate 	char	id_name[MAXNAMLEN+3];
2310Sstevel@tonic-gate 	char	id_incno;
2320Sstevel@tonic-gate 	time32_t id_ddate;
2330Sstevel@tonic-gate };
2340Sstevel@tonic-gate 
2350Sstevel@tonic-gate size_t	nidates;		/* number of records (might be zero) */
2360Sstevel@tonic-gate struct	idates	**idatev;	/* the arrayfied version */
2370Sstevel@tonic-gate #define	ITITERATE(i, ip)	\
2380Sstevel@tonic-gate 	for (i = 0; i < nidates && (ip = idatev[i]) != NULL; i++)
2390Sstevel@tonic-gate 
2400Sstevel@tonic-gate /*
2410Sstevel@tonic-gate  * Function declarations
2420Sstevel@tonic-gate  */
2430Sstevel@tonic-gate #ifdef __STDC__
2440Sstevel@tonic-gate /*
2450Sstevel@tonic-gate  * dumpfstab.c
2460Sstevel@tonic-gate  */
2470Sstevel@tonic-gate extern void mnttabread(void);
2480Sstevel@tonic-gate extern struct mntent *mnttabsearch(char *, int);
2490Sstevel@tonic-gate extern void setmnttab(void);
2500Sstevel@tonic-gate extern struct mntent *getmnttab(void);
2510Sstevel@tonic-gate /*
2520Sstevel@tonic-gate  * dumpitime.c
2530Sstevel@tonic-gate  */
2540Sstevel@tonic-gate extern char *prdate(time_t);
2550Sstevel@tonic-gate extern void inititimes(void);
2560Sstevel@tonic-gate extern void getitime(void);
2570Sstevel@tonic-gate extern void putitime(void);
2580Sstevel@tonic-gate extern void est(struct dinode *);
2590Sstevel@tonic-gate extern time32_t is_fssnap_dump(char *);
2600Sstevel@tonic-gate extern void bmapest(uchar_t *);
2610Sstevel@tonic-gate /*
2620Sstevel@tonic-gate  * dumplabel.c
2630Sstevel@tonic-gate  */
2640Sstevel@tonic-gate extern void getlabel(void);
2650Sstevel@tonic-gate /*
2660Sstevel@tonic-gate  * dumpmain.c
2670Sstevel@tonic-gate  */
2680Sstevel@tonic-gate extern void child_chdir(void);
2690Sstevel@tonic-gate extern char *unrawname(char *);
2700Sstevel@tonic-gate extern void sigAbort(int);
2710Sstevel@tonic-gate extern char *rawname(char *);
2720Sstevel@tonic-gate extern char *lf_rawname(char *);
2730Sstevel@tonic-gate extern time32_t timeclock(time32_t);
2740Sstevel@tonic-gate #ifdef signal
2750Sstevel@tonic-gate extern void (*nsignal(int, void (*)(int)))(int);
2760Sstevel@tonic-gate #endif
2770Sstevel@tonic-gate extern int safe_file_open(const char *file, int mode, int perms);
2780Sstevel@tonic-gate extern int safe_device_open(const char *file, int mode, int perms);
2790Sstevel@tonic-gate extern FILE *safe_fopen(const char *filename, const char *smode, int perms);
2800Sstevel@tonic-gate /*
2810Sstevel@tonic-gate  * dumponline.c
2820Sstevel@tonic-gate  */
2830Sstevel@tonic-gate extern void allocino(void);
2840Sstevel@tonic-gate extern void freeino(void);
2850Sstevel@tonic-gate extern void saveino(ino_t, struct dinode *);
2860Sstevel@tonic-gate extern void resetino(ino_t);
2870Sstevel@tonic-gate extern long getigen(ino_t);
2880Sstevel@tonic-gate extern int lf_ismounted(char *, char *);
2890Sstevel@tonic-gate extern int isoperator(uid_t, gid_t);
2900Sstevel@tonic-gate extern int lockfs(char *, char *);
2910Sstevel@tonic-gate extern int openi(ino_t, long, char *);
2920Sstevel@tonic-gate extern caddr_t mapfile(int, off_t, off_t, int);
2930Sstevel@tonic-gate extern void unmapfile(void);
2940Sstevel@tonic-gate extern void stattoi(struct stat *, struct dinode *);
2950Sstevel@tonic-gate extern void dumpfile(int, caddr_t, off_t, off_t, off_t, int, int);
2960Sstevel@tonic-gate extern void activepass(void);
2970Sstevel@tonic-gate /*
2980Sstevel@tonic-gate  * dumpoptr.c
2990Sstevel@tonic-gate  */
3000Sstevel@tonic-gate extern int query(char *);
3010Sstevel@tonic-gate extern int query_once(char *, int);
3020Sstevel@tonic-gate extern void interrupt(int);
3030Sstevel@tonic-gate extern void broadcast(char *);
3040Sstevel@tonic-gate extern void timeest(int, int);
3050Sstevel@tonic-gate /*PRINTFLIKE1*/
3060Sstevel@tonic-gate extern void msg(const char *, ...);
3070Sstevel@tonic-gate /*PRINTFLIKE1*/
3080Sstevel@tonic-gate extern void msgtail(const char *, ...);
3090Sstevel@tonic-gate extern void lastdump(int);
3100Sstevel@tonic-gate extern char *getresponse(char *, char *);
3110Sstevel@tonic-gate /*
3120Sstevel@tonic-gate  * dumptape.c
3130Sstevel@tonic-gate  */
3140Sstevel@tonic-gate extern void alloctape(void);
3150Sstevel@tonic-gate extern void reset(void);
3160Sstevel@tonic-gate extern void spclrec(void);
3170Sstevel@tonic-gate extern void taprec(uchar_t *, int, int);
3180Sstevel@tonic-gate extern void dmpblk(daddr32_t, size_t, off_t);
3190Sstevel@tonic-gate extern void toslave(void (*)(ino_t), ino_t);
3200Sstevel@tonic-gate extern void doinode(ino_t);
3210Sstevel@tonic-gate extern void dospcl(ino_t);
3220Sstevel@tonic-gate extern void flushcmds(void);
3230Sstevel@tonic-gate extern void flusht(void);
3240Sstevel@tonic-gate extern void nextdevice(void);
3250Sstevel@tonic-gate extern int isrewind(int);
3260Sstevel@tonic-gate extern void trewind(void);
3270Sstevel@tonic-gate extern void close_rewind(void);
3280Sstevel@tonic-gate extern void changevol(void);
3290Sstevel@tonic-gate extern void otape(int);
3300Sstevel@tonic-gate extern void dumpabort(void);
3310Sstevel@tonic-gate extern void dumpailing(void);
3320Sstevel@tonic-gate extern void Exit(int);
3330Sstevel@tonic-gate extern void positiontape(char *);
3340Sstevel@tonic-gate /*
3350Sstevel@tonic-gate  * dumptraverse.c
3360Sstevel@tonic-gate  */
3370Sstevel@tonic-gate extern void pass(void (*)(struct dinode *), uchar_t *);
3380Sstevel@tonic-gate extern void mark(struct dinode *);
3390Sstevel@tonic-gate extern void active_mark(struct dinode *);
3400Sstevel@tonic-gate extern void markshad(struct dinode *);
3410Sstevel@tonic-gate extern void estshad(struct dinode *);
3420Sstevel@tonic-gate extern void freeshad();
3430Sstevel@tonic-gate extern void add(struct dinode *);
3440Sstevel@tonic-gate extern void dirdump(struct dinode *);
3450Sstevel@tonic-gate extern void dump(struct dinode *);
3460Sstevel@tonic-gate extern void lf_dump(struct dinode *);
3470Sstevel@tonic-gate extern void dumpblocks(ino_t);
3480Sstevel@tonic-gate extern void bitmap(uchar_t *, int);
3490Sstevel@tonic-gate extern struct dinode *getino(ino_t);
3500Sstevel@tonic-gate extern void bread(diskaddr_t, uchar_t *, size_t);
3510Sstevel@tonic-gate extern int hasshortmeta(struct dinode **ip);
3520Sstevel@tonic-gate /*
3530Sstevel@tonic-gate  * lftw.c
3540Sstevel@tonic-gate  */
3550Sstevel@tonic-gate extern int lftw(const char *,
3560Sstevel@tonic-gate 	int (*)(const char *, const struct stat *, int), int);
3570Sstevel@tonic-gate extern int lf_lftw(const char *,
3580Sstevel@tonic-gate 	int (*)(const char *, const struct stat64 *, int), int);
3590Sstevel@tonic-gate /*
3600Sstevel@tonic-gate  * partial.c
3610Sstevel@tonic-gate  */
3620Sstevel@tonic-gate extern void partial_check(void);
3630Sstevel@tonic-gate extern void lf_partial_check(void);
3640Sstevel@tonic-gate extern int partial_mark(int, char **);
3650Sstevel@tonic-gate /*
3660Sstevel@tonic-gate  * unctime.c
3670Sstevel@tonic-gate  */
3680Sstevel@tonic-gate extern time_t unctime(char *);
3690Sstevel@tonic-gate #else	/* !STDC */
3700Sstevel@tonic-gate /*
3710Sstevel@tonic-gate  * dumpfstab.c
3720Sstevel@tonic-gate  */
3730Sstevel@tonic-gate extern void mnttabread();
3740Sstevel@tonic-gate extern struct mntent *mnttabsearch();
3750Sstevel@tonic-gate extern void setmnttab();
3760Sstevel@tonic-gate extern struct mntent *getmnttab();
3770Sstevel@tonic-gate /*
3780Sstevel@tonic-gate  * dumpitime.c
3790Sstevel@tonic-gate  */
3800Sstevel@tonic-gate extern char *prdate();
3810Sstevel@tonic-gate extern void inititimes();
3820Sstevel@tonic-gate extern void getitime();
3830Sstevel@tonic-gate extern void putitime();
3840Sstevel@tonic-gate extern void est();
3850Sstevel@tonic-gate extern time32_t is_fssnap_dump();
3860Sstevel@tonic-gate extern void bmapest();
3870Sstevel@tonic-gate /*
3880Sstevel@tonic-gate  * dumplabel.c
3890Sstevel@tonic-gate  */
3900Sstevel@tonic-gate extern void getlabel();
3910Sstevel@tonic-gate /*
3920Sstevel@tonic-gate  * dumpmain.c
3930Sstevel@tonic-gate  */
3940Sstevel@tonic-gate extern void child_chdir();
3950Sstevel@tonic-gate extern char *unrawname();
3960Sstevel@tonic-gate extern void sigAbort();
3970Sstevel@tonic-gate extern char *rawname();
3980Sstevel@tonic-gate extern char *lf_rawname();
3990Sstevel@tonic-gate extern time_t timeclock();
4000Sstevel@tonic-gate #ifdef signal
4010Sstevel@tonic-gate extern void nsignal();
4020Sstevel@tonic-gate #endif
4030Sstevel@tonic-gate extern int safe_file_open();
4040Sstevel@tonic-gate extern int safe_device_open();
4050Sstevel@tonic-gate extern FILE *safe_fopen();
4060Sstevel@tonic-gate /*
4070Sstevel@tonic-gate  * dumponline.c
4080Sstevel@tonic-gate  */
4090Sstevel@tonic-gate extern void allocino();
4100Sstevel@tonic-gate extern void freeino();
4110Sstevel@tonic-gate extern void saveino();
4120Sstevel@tonic-gate extern void resetino();
4130Sstevel@tonic-gate extern long getigen();
4140Sstevel@tonic-gate extern int lf_ismounted();
4150Sstevel@tonic-gate extern int isoperator();
4160Sstevel@tonic-gate extern ulong_t lockfs();
4170Sstevel@tonic-gate extern int openi();
4180Sstevel@tonic-gate extern caddr_t mapfile();
4190Sstevel@tonic-gate extern void unmapfile();
4200Sstevel@tonic-gate extern void stattoi();
4210Sstevel@tonic-gate extern void dumpfile();
4220Sstevel@tonic-gate extern void activepass();
4230Sstevel@tonic-gate /*
4240Sstevel@tonic-gate  * dumpoptr.c
4250Sstevel@tonic-gate  */
4260Sstevel@tonic-gate extern int query();
4270Sstevel@tonic-gate extern int query_once();
4280Sstevel@tonic-gate extern void interrupt();
4290Sstevel@tonic-gate extern void broadcast();
4300Sstevel@tonic-gate extern void timeest();
4310Sstevel@tonic-gate extern void msg();
4320Sstevel@tonic-gate extern void msgtail();
4330Sstevel@tonic-gate extern void lastdump();
4340Sstevel@tonic-gate extern char *getresponse();
4350Sstevel@tonic-gate /*
4360Sstevel@tonic-gate  * dumptape.c
4370Sstevel@tonic-gate  */
4380Sstevel@tonic-gate extern void alloctape();
4390Sstevel@tonic-gate extern void reset();
4400Sstevel@tonic-gate extern void spclrec();
4410Sstevel@tonic-gate extern void taprec();
4420Sstevel@tonic-gate extern void dmpblk();
4430Sstevel@tonic-gate extern void toslave();
4440Sstevel@tonic-gate extern void doinode();
4450Sstevel@tonic-gate extern void dospcl();
4460Sstevel@tonic-gate extern void flushcmds();
4470Sstevel@tonic-gate extern void flusht();
4480Sstevel@tonic-gate extern void nextdevice();
4490Sstevel@tonic-gate extern int isrewind();
4500Sstevel@tonic-gate extern void trewind();
4510Sstevel@tonic-gate extern void close_rewind();
4520Sstevel@tonic-gate extern void changevol();
4530Sstevel@tonic-gate extern void otape();
4540Sstevel@tonic-gate extern void dumpabort();
4550Sstevel@tonic-gate extern void dumpailing();
4560Sstevel@tonic-gate extern void Exit();
4570Sstevel@tonic-gate extern void positiontape();
4580Sstevel@tonic-gate /*
4590Sstevel@tonic-gate  * dumptraverse.c
4600Sstevel@tonic-gate  */
4610Sstevel@tonic-gate extern void pass();
4620Sstevel@tonic-gate extern void mark();
4630Sstevel@tonic-gate extern void active_mark();
4640Sstevel@tonic-gate extern void markshad();
4650Sstevel@tonic-gate extern void estshad();
4660Sstevel@tonic-gate extern void freeshad();
4670Sstevel@tonic-gate extern void add();
4680Sstevel@tonic-gate extern void dirdump();
4690Sstevel@tonic-gate extern void dump();
4700Sstevel@tonic-gate extern void lf_dump();
4710Sstevel@tonic-gate extern void dumpblocks();
4720Sstevel@tonic-gate extern void bitmap();
4730Sstevel@tonic-gate extern struct dinode *getino();
4740Sstevel@tonic-gate extern void bread();
4750Sstevel@tonic-gate extern int hasshortmeta();
4760Sstevel@tonic-gate /*
4770Sstevel@tonic-gate  * lftw.c
4780Sstevel@tonic-gate  */
4790Sstevel@tonic-gate extern int lftw();
4800Sstevel@tonic-gate extern int lf_lftw();
4810Sstevel@tonic-gate /*
4820Sstevel@tonic-gate  * partial.c
4830Sstevel@tonic-gate  */
4840Sstevel@tonic-gate extern void partial_check();
4850Sstevel@tonic-gate extern void lf_partial_check();
4860Sstevel@tonic-gate extern int partial_mark();
4870Sstevel@tonic-gate /*
4880Sstevel@tonic-gate  * unctime.c
4890Sstevel@tonic-gate  */
4900Sstevel@tonic-gate extern time_t unctime();
4910Sstevel@tonic-gate #endif /* __STDC__ */
4920Sstevel@tonic-gate 
4930Sstevel@tonic-gate /* Insufficiently-featureful system header files... */
4940Sstevel@tonic-gate NOTE(ALIGNMENT(mmap, 8))
4950Sstevel@tonic-gate 
4960Sstevel@tonic-gate 
4970Sstevel@tonic-gate #ifdef	__cplusplus
4980Sstevel@tonic-gate }
4990Sstevel@tonic-gate #endif
5000Sstevel@tonic-gate 
5010Sstevel@tonic-gate #endif /* _DUMP_H */
502