1 /*	$OpenBSD: extern.h,v 1.10 2005/06/14 19:46:05 millert Exp $	*/
2 /*	$NetBSD: extern.h,v 1.4 1995/03/18 14:59:43 cgd Exp $	*/
3 
4 /*-
5  * Copyright (c) 1992, 1993
6  *	The Regents of the University of California.  All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of the University nor the names of its contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  *
32  *	@(#)extern.h	8.2 (Berkeley) 1/7/94
33  */
34 
35 struct entry	*addentry(char *, ino_t, int);
36 long		 addfile(char *, ino_t, int);
37 void		 badentry(struct entry *, char *);
38 void	 	 canon(char *, char *, size_t);
39 void		 checkrestore(void);
40 void 		 cleanup(void);
41 void		 closemt(void);
42 void		 createfiles(void);
43 void		 createleaves(char *);
44 void		 createlinks(void);
45 long		 deletefile(char *, ino_t, int);
46 void		 deleteino(ino_t);
47 ino_t		 dirlookup(const char *);
48 void		 dumpsymtable(char *, long);
49 void	 	 extractdirs(int);
50 int		 extractfile(char *);
51 void		 findunreflinks(void);
52 char		*flagvalues(struct entry *);
53 void		 freeentry(struct entry *);
54 void		 freename(char *);
55 int	 	 genliteraldir(char *, ino_t);
56 char		*gentempname(struct entry *);
57 void		 getfile(void (*)(char *, size_t), void (*)(char *, size_t));
58 void		 getvol(long);
59 void		 initsymtable(char *);
60 int	 	 inodetype(ino_t);
61 int		 linkit(char *, char *, int);
62 struct entry	*lookupino(ino_t);
63 struct entry	*lookupname(char *);
64 long		 listfile(char *, ino_t, int);
65 ino_t		 lowerbnd(ino_t);
66 void		 mktempname(struct entry *);
67 void		 moveentry(struct entry *, char *);
68 void		 msg(const char *, ...);
69 char		*myname(struct entry *);
70 void		 newnode(struct entry *);
71 void		 newtapebuf(long);
72 long		 nodeupdates(char *, ino_t, int);
73 void	 	 onintr(int);
74 void		 panic(const char *, ...);
75 void		 pathcheck(char *);
76 struct direct	*pathsearch(const char *);
77 void		 printdumpinfo(void);
78 void		 removeleaf(struct entry *);
79 void		 removenode(struct entry *);
80 void		 removeoldleaves(void);
81 void		 removeoldnodes(void);
82 void		 renameit(char *, char *);
83 int		 reply(char *);
84 RST_DIR		*rst_opendir(const char *);
85 struct direct	*rst_readdir(RST_DIR *);
86 void		 rst_closedir(RST_DIR *dirp);
87 void	 	 runcmdshell(void);
88 char		*savename(char *);
89 void	 	 setdirmodes(int);
90 void		 setinput(char *);
91 void		 setup(void);
92 void	 	 skipdirs(void);
93 void		 skipfile(void);
94 void		 skipmaps(void);
95 void	 	 treescan(char *, ino_t, long (*)(char *, ino_t, int));
96 ino_t		 upperbnd(ino_t);
97 long		 verifyfile(char *, ino_t, int);
98 void		 xtrnull(char *, size_t);
99 
100 /* From ../dump/dumprmt.c */
101 void		rmtclose(void);
102 int		rmthost(char *);
103 int		rmtioctl(int, int);
104 int		rmtopen(char *, int);
105 int		rmtread(char *, int);
106 int		rmtseek(int, int);
107