]> git.wh0rd.org - dump.git/blobdiff - restore/restore.h
Another set of fixes for file not found at end of tape.
[dump.git] / restore / restore.h
index 1cef2d90e4bc6385a08d98968d598d770cc0aa56..a55a8fdfaa801570cf23ed39480c4792fa663451 100644 (file)
@@ -1,8 +1,11 @@
 /*
  *     Ported to Linux's Second Extended File System as part of the
  *     dump and restore backup suit
- *     Remy Card <card@Linux.EU.Org>, 1994, 1995, 1996
+ *     Remy Card <card@Linux.EU.Org>, 1994-1997
+ *     Stelian Pop <pop@noos.fr>, 1999-2000
+ *     Stelian Pop <pop@noos.fr> - AlcĂ´ve <www.alcove.fr>, 2000
  *
+ *     $Id: restore.h,v 1.20 2001/12/24 15:53:41 stelian Exp $
  */
 
 /*
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
- *     @(#)restore.h   8.3 (Berkeley) 9/13/94
  */
 
+#include <config.h>
+#include <protocols/dumprestore.h>
 /*
  * Flags
  */
@@ -52,16 +55,22 @@ extern int  cvtflag;        /* convert from old to new tape format */
 extern int     bflag;          /* set input block size */
 extern int     dflag;          /* print out debugging info */
 extern int     hflag;          /* restore heirarchies */
+extern int     lflag;          /* assume remote filename is a regular file */
 extern int     mflag;          /* restore by name instead of inode number */
+extern int     Mflag;          /* multi-volume restore */
+extern int     Vflag;          /* multi-volume on a single device like CDROM */
 extern int     Nflag;          /* do not write the disk */
+extern int     uflag;          /* unlink symlink targets */
 extern int     vflag;          /* print out actions taken */
 extern int     yflag;          /* always try to recover from tape errors */
+extern int     zflag;          /* tape is in compressed format */
+extern char*   bot_script;     /* beginning of tape script */
 /*
  * Global variables
  */
 extern char    *dumpmap;       /* map of inodes on this dump tape */
-extern char    *usedinomap;    /* map of inodes to be deleted */
-extern ino_t   maxino;         /* highest numbered inode in this file system */
+extern char    *usedinomap;    /* map of inodes that are in use on this fs */
+extern dump_ino_t maxino;      /* highest numbered inode in this file system */
 extern long    dumpnum;        /* location of the dump on this tape */
 extern long    volno;          /* current volume being read */
 extern long    ntrec;          /* number of TP_BSIZE records per tape block */
@@ -69,14 +78,16 @@ extern time_t       dumptime;       /* time that this dump begins */
 extern time_t  dumpdate;       /* time that this dump was made */
 extern char    command;        /* opration being performed */
 extern FILE    *terminal;      /* file descriptor for the terminal input */
+extern int     pipein;         /* input is from a pipe */
+extern char    *tmpdir;        /* name of temp directory */
 extern int     oldinofmt;      /* reading tape with old format inodes */
 extern int     Bcvt;           /* need byte swapping on inodes and dirs */
 extern int     compare_ignore_not_found;
                                /* used to compare incremental dumps, */
                                /* so messages about "not found" files */
                                /* isn't seen. */
-extern char    *filesys;       /* name of dumped filesystem */
-extern char    *tmpdir;        /* name of temp directory */
+extern int     compare_errors; /* did we encounter any compare errors? */
+extern char    filesys[NAMELEN];/* name of dumped filesystem */
 
 /*
  * Each file in the file system is described by one of these entries
@@ -86,7 +97,7 @@ struct entry {
        u_char  e_namlen;               /* length of this name */
        char    e_type;                 /* type of this entry, see below */
        short   e_flags;                /* status flags, see below */
-       ino_t   e_ino;                  /* inode number in previous file sys */
+       dump_ino_t e_ino;               /* inode number in previous file sys */
        long    e_index;                /* unique index (for dumpped table) */
        struct  entry *e_parent;        /* pointer to parent directory (..) */
        struct  entry *e_sibling;       /* next element in this directory (.) */
@@ -118,7 +129,7 @@ struct entry {
  */
 struct context {
        char    *name;          /* name of file */
-       ino_t   ino;            /* inumber of file */
+       dump_ino_t ino;         /* inumber of file */
 #ifdef __linux__
        struct  new_bsd_inode *dip;     /* pointer to inode */
 #else
@@ -149,8 +160,18 @@ typedef struct rstdirdesc RST_DIR;
 #define        SETINO(ino, map) \
        map[(u_int)((ino) - 1) / NBBY] |=  1 << ((u_int)((ino) - 1) % NBBY)
 
-#define dprintf                if (dflag) fprintf
-#define vprintf                if (vflag) fprintf
+#define Dprintf                if (dflag) fprintf
+#define Vprintf                if (vflag) fprintf
 
 #define GOOD 1
 #define FAIL 0
+
+#ifdef USE_QFA
+#define QFA_MAGIC      "495115637697"
+#define QFA_VERSION    "1.0"
+extern FILE    *gTapeposfp;
+extern char    *gTapeposfile;
+extern char    gTps[255];
+extern long    gSeekstart;
+extern int     tapeposflag;
+#endif /* USE_QFA */