* Ported to Linux's Second Extended File System as part of the
* dump and restore backup suit
* 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
+ * Stelian Pop <stelian@popies.net>, 1999-2000
+ * Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
*
- * $Id: restore.h,v 1.16 2001/07/18 12:54:06 stelian Exp $
+ * $Id: restore.h,v 1.24 2002/01/25 14:59:53 stelian Exp $
*/
/*
/*
* 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 */
/*
* 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 */
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 */
/* 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
#ifdef USE_QFA
#define QFA_MAGIC "495115637697"
#define QFA_VERSION "1.0"
-FILE *gTapeposfp;
-char *gTapeposfile;
-char gTps[255];
-long gSeekstart;
-int tapeposflag;
+extern FILE *gTapeposfp;
+extern char *gTapeposfile;
+extern char gTps[255];
+extern long gSeekstart;
+extern int tapeposflag;
#endif /* USE_QFA */
+
+#define do_compare_error \
+ if (++compare_errors >= Lflag && Lflag) { \
+ printf("Compare errors limit reached, exiting...\n"); \
+ exit(2); \
+ }
+