extern.h revision 302408
166458Sdfr/*-
266458Sdfr * Copyright (c) 1992, 1993
396912Smarcel *	The Regents of the University of California.  All rights reserved.
496912Smarcel *
5139790Simp * Redistribution and use in source and binary forms, with or without
666458Sdfr * modification, are permitted provided that the following conditions
766458Sdfr * are met:
866458Sdfr * 1. Redistributions of source code must retain the above copyright
966458Sdfr *    notice, this list of conditions and the following disclaimer.
1066458Sdfr * 2. Redistributions in binary form must reproduce the above copyright
1166458Sdfr *    notice, this list of conditions and the following disclaimer in the
1266458Sdfr *    documentation and/or other materials provided with the distribution.
1366458Sdfr * 4. Neither the name of the University nor the names of its contributors
1466458Sdfr *    may be used to endorse or promote products derived from this software
1566458Sdfr *    without specific prior written permission.
1666458Sdfr *
1766458Sdfr * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1866458Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1966458Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2066458Sdfr * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2166458Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2266458Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2366458Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2466458Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2566458Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2666458Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2766458Sdfr * SUCH DAMAGE.
2866458Sdfr *
2966458Sdfr *	@(#)extern.h	8.2 (Berkeley) 1/7/94
3066458Sdfr * $FreeBSD: stable/11/sbin/restore/extern.h 298901 2016-05-01 21:17:30Z pfg $
3166458Sdfr */
3266458Sdfr
3366458Sdfrstruct entry	*addentry(char *, ino_t, int);
3466458Sdfrlong		 addfile(char *, ino_t, int);
3566458Sdfrint		 addwhiteout(char *);
3666458Sdfrvoid		 badentry(struct entry *, char *);
3766458Sdfrvoid	 	 canon(char *, char *, size_t);
3866458Sdfrvoid		 checkrestore(void);
3966458Sdfrvoid		 closemt(void);
4066458Sdfrvoid		 createfiles(void);
4166458Sdfrvoid		 createleaves(char *);
4266458Sdfrvoid		 createlinks(void);
4366458Sdfrlong		 deletefile(char *, ino_t, int);
4496912Smarcelvoid		 deleteino(ino_t);
4566458Sdfrvoid		 delwhiteout(struct entry *);
4666458Sdfrino_t		 dirlookup(const char *);
4766458Sdfrvoid 	 	 done(int) __dead2;
4866458Sdfrvoid		 dumpsymtable(char *, long);
49115084Smarcelvoid	 	 extractdirs(int);
5066458Sdfrint		 extractfile(char *);
5166458Sdfrvoid		 findunreflinks(void);
52115084Smarcelchar		*flagvalues(struct entry *);
5366458Sdfrvoid		 freeentry(struct entry *);
5466458Sdfrvoid		 freename(char *);
5566458Sdfrint	 	 genliteraldir(char *, ino_t);
5666458Sdfrchar		*gentempname(struct entry *);
5766458Sdfrvoid		 getfile(void (*)(char *, size_t), void (*)(char *, size_t),
5866458Sdfr			void (*)(char *, size_t));
5966458Sdfrvoid		 getvol(long);
6066458Sdfrvoid		 initsymtable(char *);
6166458Sdfrint	 	 inodetype(ino_t);
6266458Sdfrint		 linkit(char *, char *, int);
6366458Sdfrstruct entry	*lookupino(ino_t);
6466458Sdfrstruct entry	*lookupname(char *);
6566458Sdfrlong		 listfile(char *, ino_t, int);
6666458Sdfrino_t		 lowerbnd(ino_t);
6766458Sdfrvoid		 mktempname(struct entry *);
6866458Sdfrvoid		 moveentry(struct entry *, char *);
6966458Sdfrvoid		 msg(const char *, ...) __printflike(1, 2);
7092670Speterchar		*myname(struct entry *);
7166458Sdfrvoid		 newnode(struct entry *);
7266458Sdfrvoid		 newtapebuf(long);
7366458Sdfrlong		 nodeupdates(char *, ino_t, int);
7466458Sdfrvoid	 	 onintr(int);
7566458Sdfrvoid		 panic(const char *, ...) __printflike(1, 2);
7666458Sdfrvoid		 pathcheck(char *);
7766458Sdfrstruct direct	*pathsearch(const char *);
7866458Sdfrvoid		 printdumpinfo(void);
7966458Sdfrvoid		 removeleaf(struct entry *);
8066458Sdfrvoid		 removenode(struct entry *);
8166458Sdfrvoid		 removeoldleaves(void);
8266458Sdfrvoid		 removeoldnodes(void);
8366458Sdfrvoid		 renameit(char *, char *);
8466458Sdfrint		 reply(char *);
8566458Sdfrvoid		*rst_opendir(const char *);
8666458Sdfrstruct direct	*rst_readdir(RST_DIR *);
8766458Sdfrvoid		 rst_closedir(void *);
8866458Sdfrvoid	 	 runcmdshell(void);
8966458Sdfrchar		*savename(char *);
9066458Sdfrvoid		 set_extattr_file(char *, void *, int);
9166458Sdfrvoid	 	 setdirmodes(int);
9266458Sdfrvoid		 setinput(char *, int);
9366458Sdfrvoid		 setup(void);
9466458Sdfrvoid	 	 skipdirs(void);
9566458Sdfrvoid		 skipfile(void);
9666458Sdfrvoid		 skipmaps(void);
9766458Sdfrvoid		 swabst(u_char *, u_char *);
9866458Sdfrvoid	 	 treescan(char *, ino_t, long (*)(char *, ino_t, int));
9966458Sdfrino_t		 upperbnd(ino_t);
10066458Sdfrlong		 verifyfile(char *, ino_t, int);
10166458Sdfrvoid		 xtrnull(char *, size_t);
10266458Sdfr
10366458Sdfr/* From ../dump/dumprmt.c */
104150008Salcvoid		rmtclose(void);
10566458Sdfrint		rmthost(char *);
10666458Sdfrint		rmtioctl(int, int);
10766458Sdfrint		rmtopen(char *, int);
10866458Sdfrint		rmtread(char *, int);
10966458Sdfrint		rmtseek(int, int);
11066458Sdfr