extern.h revision 128175
1219820Sjeff/*- 2219820Sjeff * Copyright (c) 1992, 1993 3219820Sjeff * The Regents of the University of California. All rights reserved. 4219820Sjeff * 5219820Sjeff * Redistribution and use in source and binary forms, with or without 6219820Sjeff * modification, are permitted provided that the following conditions 7219820Sjeff * are met: 8219820Sjeff * 1. Redistributions of source code must retain the above copyright 9219820Sjeff * notice, this list of conditions and the following disclaimer. 10219820Sjeff * 2. Redistributions in binary form must reproduce the above copyright 11219820Sjeff * notice, this list of conditions and the following disclaimer in the 12219820Sjeff * documentation and/or other materials provided with the distribution. 13219820Sjeff * 4. Neither the name of the University nor the names of its contributors 14219820Sjeff * may be used to endorse or promote products derived from this software 15219820Sjeff * without specific prior written permission. 16219820Sjeff * 17219820Sjeff * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18219820Sjeff * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19219820Sjeff * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20219820Sjeff * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21219820Sjeff * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22219820Sjeff * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23219820Sjeff * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24219820Sjeff * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25219820Sjeff * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26219820Sjeff * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27219820Sjeff * SUCH DAMAGE. 28219820Sjeff * 29219820Sjeff * @(#)extern.h 8.2 (Berkeley) 1/7/94 30219820Sjeff * $FreeBSD: head/sbin/restore/extern.h 128175 2004-04-13 02:58:06Z green $ 31219820Sjeff */ 32219820Sjeff 33219820Sjeffstruct entry *addentry(char *, ino_t, int); 34219820Sjefflong addfile(char *, ino_t, int); 35219820Sjeffint addwhiteout(char *); 36219820Sjeffvoid badentry(struct entry *, char *); 37219820Sjeffvoid canon(char *, char *, int); 38219820Sjeffvoid checkrestore(void); 39219820Sjeffvoid closemt(void); 40219820Sjeffvoid createfiles(void); 41219820Sjeffvoid createleaves(char *); 42219820Sjeffvoid createlinks(void); 43219820Sjefflong deletefile(char *, ino_t, int); 44219820Sjeffvoid deleteino(ino_t); 45219820Sjeffvoid delwhiteout(struct entry *); 46219820Sjeffino_t dirlookup(const char *); 47219820Sjeffvoid done(int) __dead2; 48219820Sjeffvoid dumpsymtable(char *, long); 49219820Sjeffvoid extractdirs(int); 50219820Sjeffint extractfile(char *); 51219820Sjeffvoid findunreflinks(void); 52219820Sjeffchar *flagvalues(struct entry *); 53219820Sjeffvoid freeentry(struct entry *); 54219820Sjeffvoid freename(char *); 55219820Sjeffint genliteraldir(char *, ino_t); 56219820Sjeffchar *gentempname(struct entry *); 57219820Sjeffvoid getfile(void (*)(char *, long), void (*)(char *, long)); 58219820Sjeffvoid getvol(long); 59219820Sjeffvoid initsymtable(char *); 60219820Sjeffint inodetype(ino_t); 61219820Sjeffint linkit(char *, char *, int); 62219820Sjeffstruct entry *lookupino(ino_t); 63219820Sjeffstruct entry *lookupname(char *); 64219820Sjefflong listfile(char *, ino_t, int); 65219820Sjeffino_t lowerbnd(ino_t); 66219820Sjeffvoid mktempname(struct entry *); 67219820Sjeffvoid moveentry(struct entry *, char *); 68219820Sjeffvoid msg(const char *, ...) __printflike(1, 2); 69219820Sjeffchar *myname(struct entry *); 70219820Sjeffvoid newnode(struct entry *); 71219820Sjeffvoid newtapebuf(long); 72219820Sjefflong nodeupdates(char *, ino_t, int); 73219820Sjeffvoid onintr(int); 74void panic(const char *, ...) __printflike(1, 2); 75void pathcheck(char *); 76struct direct *pathsearch(const char *); 77void printdumpinfo(void); 78void removeleaf(struct entry *); 79void removenode(struct entry *); 80void removeoldleaves(void); 81void removeoldnodes(void); 82void renameit(char *, char *); 83int reply(char *); 84RST_DIR *rst_opendir(const char *); 85struct direct *rst_readdir(RST_DIR *); 86void rst_closedir(RST_DIR *dirp); 87void runcmdshell(void); 88char *savename(char *); 89void setdirmodes(int); 90void setinput(char *, int); 91void setup(void); 92void skipdirs(void); 93void skipfile(void); 94void skipmaps(void); 95void swabst(u_char *, u_char *); 96void treescan(char *, ino_t, long (*)(char *, ino_t, int)); 97ino_t upperbnd(ino_t); 98long verifyfile(char *, ino_t, int); 99void xtrnull(char *, long); 100 101/* From ../dump/dumprmt.c */ 102void rmtclose(void); 103int rmthost(char *); 104int rmtioctl(int, int); 105int rmtopen(char *, int); 106int rmtread(char *, int); 107int rmtseek(int, int); 108