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 * 3. 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: src/sbin/restore/extern.h,v 1.5 1999/08/28 00:14:05 peter Exp $ 31 * $DragonFly: src/sbin/restore/extern.h,v 1.4 2005/08/28 04:35:14 dillon Exp $ 32 */ 33 34 struct entry *addentry(char *, ufs1_ino_t, int); 35 long addfile(char *, ufs1_ino_t, int); 36 int addwhiteout(char *); 37 void badentry(struct entry *, char *); 38 void canon(char *, char *, int); 39 void checkrestore(void); 40 void closemt(void); 41 void createfiles(void); 42 void createleaves(char *); 43 void createlinks(void); 44 long deletefile(char *, ufs1_ino_t, int); 45 void deleteino(ufs1_ino_t); 46 void delwhiteout(struct entry *); 47 ufs1_ino_t dirlookup(const char *); 48 void done(int) __dead2; 49 void dumpsymtable(char *, long); 50 void extractdirs(int); 51 int extractfile(char *); 52 void findunreflinks(void); 53 char *flagvalues(struct entry *); 54 void freeentry(struct entry *); 55 void freename(char *); 56 int genliteraldir(char *, ufs1_ino_t); 57 char *gentempname(struct entry *); 58 void getfile(void (*)(char *, long), void (*)(char *, long)); 59 void getvol(long); 60 void initsymtable(char *); 61 int inodetype(ufs1_ino_t); 62 int linkit(char *, char *, int); 63 struct entry *lookupino(ufs1_ino_t); 64 struct entry *lookupname(char *); 65 long listfile(char *, ufs1_ino_t, int); 66 ufs1_ino_t lowerbnd(ufs1_ino_t); 67 void mktempname(struct entry *); 68 void moveentry(struct entry *, char *); 69 void msg(const char *, ...) __printflike(1, 2); 70 char *myname(struct entry *); 71 void newnode(struct entry *); 72 void newtapebuf(long); 73 long nodeupdates(char *, ufs1_ino_t, int); 74 void onintr(int); 75 void panic(const char *, ...) __printflike(1, 2); 76 void pathcheck(char *); 77 struct direct *pathsearch(const char *); 78 void printdumpinfo(void); 79 void removeleaf(struct entry *); 80 void removenode(struct entry *); 81 void removeoldleaves(void); 82 void removeoldnodes(void); 83 void renameit(char *, char *); 84 int reply(char *); 85 RST_DIR *rst_opendir(const char *); 86 struct direct *rst_readdir(RST_DIR *); 87 void rst_closedir(RST_DIR *dirp); 88 void runcmdshell(void); 89 char *savename(char *); 90 void setdirmodes(int); 91 void setinput(char *); 92 void setup(void); 93 void skipdirs(void); 94 void skipfile(void); 95 void skipmaps(void); 96 void swabst(u_char *, u_char *); 97 void treescan(char *, ufs1_ino_t, long (*)(char *, ufs1_ino_t, int)); 98 ufs1_ino_t upperbnd(ufs1_ino_t); 99 long verifyfile(char *, ufs1_ino_t, int); 100 void xtrnull(char *, long); 101 102 /* From ../dump/dumprmt.c */ 103 void rmtclose(void); 104 int rmthost(char *); 105 int rmtioctl(int, int); 106 int rmtopen(char *, int); 107 int rmtread(char *, int); 108 int rmtseek(int, int); 109