summaryrefslogtreecommitdiffstats
path: root/sbin/restore/tape.c
Commit message (Collapse)AuthorAgeFilesLines
* more file system > filesystemtrhodes2002-05-161-1/+1
|
* Address a few minor style and consistency issues in revision 1.32.iedowse2002-05-061-23/+15
| | | | Submitted by: Joshua Goodall <joshua@roughtrade.net>
* Set the permissions on restored symbolic links.iedowse2002-05-021-1/+19
| | | | | PR: bin/37665 Submitted by: "Michael C. Adler" <mad1@tapil.com>
* o remove __Pimp2002-03-201-92/+47
| | | | | o Use ANSI function definitions o unifdef -D__STDC__
* Remove 'register' keyword.obrien2002-03-201-9/+9
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* Use a more robust scheme for determining how many blocks to skipiedowse2002-02-181-15/+18
| | | | | | | | | after an EOT-terminated volume. We keep track of the current record number, and synchronise it with the c_tapea field each time we read a header. Avoid the use of c_firstrec because some bugs in dump can cause it to be set incorrectly. Move the initialisation of some variables to avoid compiler warnings.
* When we reach the end of the dump in findinode(), ask for anotheriedowse2002-02-181-9/+19
| | | | | | | | | | volume if we missed some earlier tapes (the user can still enter 'none' later if the tapes are unavailable). Previously with 'x' restores, we might not ask for all tapes if the tapes are supplied in reverse order. Clarify the message that describes what volume should be mounted first; reverse order is only efficient when extracting a few files.
* Fix a number of long-standing restore bugs in tape.c, mainly relatingiedowse2002-02-131-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | to multi-volume restores: - In findinode(), keep a copy of header->c_type so that we don't exit the do-while loop until we have processed the current header. Exiting too early leaves curfile.ino set to 0, which confuses the logic in createfiles(), so multi-volume restores with the 'x' command don't work if you follow the instructions and supply the tapes in reverse order. This appears to have been broken by CSRG revision 5.33 tape.c (Oct 1992). - The logic in getvol() for deciding how many records to skip after the volume header was confused; sometimes it would skip too few records and sometimes too many, leading to "resync restore" warnings and missing files. Skip to the next header only when the current action is not `USING'. Work around a dump bug that sets c_count incorrectly in the volume header of the first tape. Some of the problems here date back to at least 1991. - Back out revision 1.23. This appeared to avoid warnings about missing files in the 'rN' verification case, but it made the problems with the 'x' command worse by stopping getvol() from even attempting to find the first inode number on the newly inserted tape. The bug it addressed is fixed by correcting the skipping logic as described above. - Save the value of `tpblksread' in case the wrong volume is supplied, because it is incremented each time we read a volume header. We already saved `blksread' for the same reson.
* Don't refer to findinode()'s `complain' parameter in a comment; itiedowse2002-02-121-1/+1
| | | | was removed in 1986.
* I've been meaning to do this for a while. Add an underscore to thedillon2002-01-191-9/+9
| | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee.
* Make the protocol/dumprestore.h header match restore's idea of the dumpdillon2001-10-281-9/+13
| | | | | | | | header for the case where sizeof(time_t) != sizeof(int). dumprestore.h was embedding time_t when it should have been embedding int32_t. Use time_to_time32() and time32_to_time() to convert between the protocoll/file-format time and time_t.
* Add 'SKIP' as an action so that verification works for multivolume restores.mjacob2001-06-111-1/+1
| | | | | | | | Tested with filesystem files. PR: 27218 Submitted by: mad1@tapil.com MFC after: 3 weeks
* Move _PATH_DEFTAPE to <paths.h> to remove all the duplication of definitons,obrien2001-03-081-1/+1
| | | | and remove leading `r'(aw) from it.
* Stop restore from looping under certain error conditions. Thisiedowse2000-12-121-7/+9
| | | | | | | | | corrects cases where restore would spew an infinite stream of "Changing volumes on pipe input?" messages, or would loop waiting for a response to the "set owner/mode for '.'" question. PR: bin/14250 Reviewed by: dwmalone
* Don't give up on file write errors. Just log them and continue.mckusick2000-12-121-1/+0
|
* Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and therebywollman2000-10-101-0/+2
| | | | <time.h>).
* Fix sign extension.mjacob2000-09-121-1/+1
| | | | | PR: 21232 Obtained from: Christian Weisgerber <naddy@mips.inka.de>
* Don't try to make files immutable (ie. chflags) before setting access times.dwmalone2000-07-161-3/+3
| | | | | | PR: 19973 Submitted by: Arjan de Vet <Arjan.deVet@adv.iae.nl> Reviewed by: Matthew Jacob <mjacob@feral.com>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* 64bit fixes.dima1998-10-271-15/+15
| | | | | | | (Note: ``dump'' doesn't work on alpha yet. Apparently there's a problem somewhere is the physio() area) Submitted by: myself && Matt Dillon.
* Commit patch from Tor Egge to fix the "large filesystem restore" problem.imp1998-07-281-6/+12
| | | | | | | This appears to work for me in the old case, but I don't have large enough filesystems to test the fix case. Reported working by: karl@mcs.net
* Add rcsid. Remove unused #includes. Add missing prototypes and others -Wallcharnier1998-07-281-2/+5
| | | | cleanings. Spelling.
* Fixed printf format errors. Sure is dusty here.bde1998-06-281-15/+16
|
* Well, nobody objected, so here's my -u (unlink) flag to restore.jkh1998-05-091-0/+6
|
* The logic in tape.c:getfile() doesn't allow for a filesystemjkh1998-03-231-1/+3
| | | | | | | | with a blocksize smaller than the tape block size. The problem seems to be most easily fixed by changeing where fssize is set. PR: 5704 Submitted by: David Malone <dwmalone@maths.tcd.ie>
* Typo fix in the message displayed.max1997-12-211-1/+1
|
* Merge from Lite2peter1997-03-111-34/+50
| | | | | | | | - cleanups, - whiteout support - bug fixes (chflags missing on a few file types etc) The dump/restore folks would want to have a closer look at this, the change is pretty big.
* Fix a minor problem with restore from tapes from big endian machines.imp1997-02-251-1/+4
| | | | | | | This finishes the closing of PR2446 which J"org Wunsch pointed out to me after I closed it. Submitted by: Tor Egge <Tor.Egge@idt.ntnu.no>
* Yet another buffer overflow.guido1997-01-011-2/+6
| | | | | | 2.2 candidate (and -stable too actually, who does that?) Reviewed by: Warner Losh
* Various security related deltas from OpenBSDimp1997-01-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dirs.c: From OpenBSD 1.2, 1.3, 1.5, 1.8, 1.10, 1.11, 1.12 1.2: use unique temporary files; netbsd pr#2544; lukem@supp.cpr.itg.telecom.com.au 1.3: updated patch from lukem@supp.cpr.itg.telecom.com.au to also make -r and -R work again 1.5: mktemp open & fdopen 1.8: /tmp// -> /tmp/ 1.10: Fix strncpy usage and correct strncat length field, from Theo. Also change some occurrence of MAXPATHLEN with sizeof(foo). 1.11: does noone know how to use strncat correctly? 1.12: use mkstemp() From NetBSD: Use open rather than create so we can specify exclusive open mode. main.c: From OpenBSD 1.2, 1.5 1.2: From NetBSD: support $TAPE. 1.5 Set umask to be read only by owner until we set real file permissions. tape.c: From NetBSD: Use open rather than create so we can specify exclusive open mode.
* ts_sec -> tv_secnate1996-09-201-7/+7
| | | | ts_nsec -> tv_nsec
* Remove trailing whitespace.rgrimes1995-05-301-7/+7
|
* Added FIFO restore capability.martin1995-02-101-0/+13
|
* BSD 4.4 Lite sbin Sourcesrgrimes1994-05-261-0/+1348
Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin.
OpenPOWER on IntegriCloud