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