| 1 | #include "config.h" // IWYU pragma: keep |
| 2 | #include "restore_globals.h" |
| 3 | |
| 4 | /* Global variables in use by restore */ |
| 5 | |
| 6 | int hflag = 1; /* restore heirarchies */ |
| 7 | int mflag = 1; /* restore by name instead of inode number */ |
| 8 | long dumpnum = 1; /* location of the dump on this tape */ |
| 9 | int dirhash_size = 1; /* size of the directory hash table */ |
| 10 | |
| 11 | /* |
| 12 | * Flags |
| 13 | */ |
| 14 | char *Afile; /* archive file */ |
| 15 | int aflag; /* automatic volume increment */ |
| 16 | int bflag; /* set input block size */ |
| 17 | int cvtflag; /* convert from old to new tape format */ |
| 18 | int Lflag; /* compare errors limit */ |
| 19 | int Nflag; /* do not write the disk */ |
| 20 | int oflag; /* do restore permissions without asking */ |
| 21 | int uflag; /* unlink symlink targets */ |
| 22 | int Vflag; /* multi-volume on a single device like CDROM */ |
| 23 | int yflag; /* always try to recover from tape errors */ |
| 24 | int nullflag; /* \0 separated output in t mode */ |
| 25 | int ufs2flag; /* tape is a FreeBSD UFS2 dump */ |
| 26 | char* bot_script; /* beginning of tape script */ |
| 27 | |
| 28 | dump_ino_t maxino; /* highest numbered inode in this file system */ |
| 29 | long volno; /* current volume being read */ |
| 30 | time_t dumptime; /* time that this dump begins */ |
| 31 | time_t dumpdate; /* time that this dump was made */ |
| 32 | char command; /* opration being performed */ |
| 33 | FILE *terminal; /* file descriptor for the terminal input */ |
| 34 | const char *tmpdir; /* name of temp directory */ |
| 35 | int oldinofmt; /* reading tape with old format inodes */ |
| 36 | int Bcvt; /* need byte swapping on inodes and dirs */ |
| 37 | int compare_ignore_not_found; |
| 38 | /* used to compare incremental dumps, */ |
| 39 | /* so messages about "not found" files */ |
| 40 | /* isn't seen. */ |
| 41 | int compare_errors; /* did we encounter any compare errors? */ |
| 42 | char filesys[PATH_MAX];/* name of dumped filesystem */ |
| 43 | int wdfd; /* original working directory */ |
| 44 | |
| 45 | #ifdef USE_QFA |
| 46 | FILE *gTapeposfp; |
| 47 | char gTps[255]; |
| 48 | long gSeekstart; |
| 49 | int tapeposflag; |
| 50 | int gTapeposfd; |
| 51 | int createtapeposflag; |
| 52 | unsigned long qfadumpdate; |
| 53 | off_t curtapepos; |
| 54 | #endif |
| 55 | |
| 56 | #ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */ |
| 57 | int transselinuxflag; |
| 58 | char *transselinuxarg; |
| 59 | #endif |
| 60 | char inline_data[INLINE_DATA_MAX_INODE_SIZE + XATTR_MAXSIZE]; |
| 61 | int pipein; /* input is from a pipe */ |
| 62 | struct context curfile; |
| 63 | |
| 64 | int _do_not_use_both_restore_globals_and_dump_globals = 0; |