1 /* $OpenBSD: extern.h,v 1.12 2014/09/07 19:43:35 guenther 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 __attribute__((__format__ (printf, 1, 2))); 70 char *myname(struct entry *); 71 void newnode(struct entry *); 72 void newtapebuf(long); 73 long nodeupdates(char *, ino_t, int); 74 void onintr(int); 75 void panic(const char *, ...) 76 __attribute__((__format__ (printf, 1, 2))); 77 void pathcheck(char *); 78 struct direct *pathsearch(const char *); 79 void printdumpinfo(void); 80 void removeleaf(struct entry *); 81 void removenode(struct entry *); 82 void removeoldleaves(void); 83 void removeoldnodes(void); 84 void renameit(char *, char *); 85 int reply(char *); 86 RST_DIR *rst_opendir(const char *); 87 struct direct *rst_readdir(RST_DIR *); 88 void rst_closedir(RST_DIR *dirp); 89 void runcmdshell(void); 90 char *savename(char *); 91 void setdirmodes(int); 92 void setinput(char *); 93 void setup(void); 94 void skipdirs(void); 95 void skipfile(void); 96 void skipmaps(void); 97 void treescan(char *, ino_t, long (*)(char *, ino_t, int)); 98 ino_t upperbnd(ino_t); 99 long verifyfile(char *, ino_t, int); 100 void xtrnull(char *, size_t); 101 void xtrfile(char *, size_t); 102 103 /* From ../dump/dumprmt.c */ 104 void rmtclose(void); 105 int rmthost(char *); 106 int rmtioctl(int, int); 107 int rmtopen(char *, int); 108 int rmtread(char *, int); 109 int rmtseek(int, int); 110