X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=restore%2Frestore.h;h=572a1bcea342bae68fd00a6c3000755a0316c9a7;hb=0cedbda5e645e6a30ef47fa3e0fae683160d4431;hp=6c77e5afd5dda49bffef0935c3d22f73d96b16b2;hpb=a1b67fc50f87e9febfd56bd2a7089eb569b852f6;p=dump.git diff --git a/restore/restore.h b/restore/restore.h index 6c77e5a..572a1bc 100644 --- a/restore/restore.h +++ b/restore/restore.h @@ -2,10 +2,10 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999-2000 - * Stelian Pop - Alcôve , 2000 + * Stelian Pop , 1999-2000 + * Stelian Pop - Alcôve , 2000-2002 * - * $Id: restore.h,v 1.14 2001/03/20 10:02:48 stelian Exp $ + * $Id: restore.h,v 1.25 2002/02/04 11:18:46 stelian Exp $ */ /* @@ -51,20 +51,27 @@ /* * Flags */ +extern int aflag; /* automatic volume increment */ +extern char *Afile; /* archive file */ 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 Lflag; /* compare errors limit */ 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 *host; /* name of the remote host */ extern char *dumpmap; /* map of inodes on this dump tape */ 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 */ @@ -75,6 +82,7 @@ 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 */ @@ -84,6 +92,7 @@ extern int compare_ignore_not_found; /* isn't seen. */ extern int compare_errors; /* did we encounter any compare errors? */ extern char filesys[NAMELEN];/* name of dumped filesystem */ +extern dump_ino_t volinfo[]; /* which inode on which volume archive info */ /* * Each file in the file system is described by one of these entries @@ -126,7 +135,7 @@ struct entry { struct context { char *name; /* name of file */ dump_ino_t ino; /* inumber of file */ -#ifdef __linux__ +#if defined(__linux__) || defined(sunos) struct new_bsd_inode *dip; /* pointer to inode */ #else struct dinode *dip; /* pointer to inode */ @@ -161,3 +170,24 @@ typedef struct rstdirdesc RST_DIR; #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; +extern int gTapeposfd; +extern int createtapeposflag; +extern unsigned long qfadumpdate; +extern long long curtapepos; +#endif /* USE_QFA */ + +#define do_compare_error \ + if (++compare_errors >= Lflag && Lflag) { \ + printf("Compare errors limit reached, exiting...\n"); \ + exit(2); \ + } +