X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Frestore.h;h=6c45e8b2b0427a176f0805af468067ebff9d115a;hp=81dfdc75d5a5e0c95e463619ee1af6fa82604659;hb=80784c730bd4c8c3399762f8955b54c6f6b4bab7;hpb=f48a055e452249091f3c6851a20431a8c87135b1 diff --git a/restore/restore.h b/restore/restore.h index 81dfdc7..6c45e8b 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.17 2001/08/13 16:17:52 stelian Exp $ + * $Id: restore.h,v 1.26 2002/06/08 07:10:37 stelian Exp $ */ /* @@ -51,12 +51,18 @@ /* * 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 oflag; /* do restore permissions without asking */ +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 */ @@ -66,6 +72,7 @@ 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 */ @@ -76,6 +83,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 */ @@ -85,6 +93,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 @@ -127,7 +136,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 */ @@ -171,4 +180,15 @@ 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); \ + } +