Commit Graph

143 Commits

Author SHA1 Message Date
lukem
e9164a9509 When using the read cache in bread(), ensure that the current (sub)block
isn't past the end of the file system.

Should fix the "spins forever but doing nothing" bug that dump
would occasionally have.
2001-12-22 08:45:36 +00:00
lukem
4720d32cfe - use correct type for minTime in findlru() (size_t instead of int)
- clean up whitespace
2001-12-22 08:05:24 +00:00
lukem
750a014c75 In rawread(), add back a check to ensure that dump doesn't try to read
past EOM and fail with "short read error". This check was part of
traverse.c::bread(), and was removed when that function was migrated
to rcache.c::rawread() as part of the "read cache" functionality.

This should fix the problem with dump barfing on "short read" when "-r 0",
but I'm still debugging the problem where dump gets to a point and
"does nothing" when the read cache is being used.
2001-12-22 07:45:38 +00:00
soren
11c2f93975 Another little mistake, spotted by wiz. 2001-12-20 20:20:38 +00:00
soren
dc53bf3cba Sync getopt() / man page with actual getopt options. 2001-12-20 20:10:33 +00:00
bouyer
740dbf0d62 Add a -l (autoload) flag. For multivolume dumps, this makes dump eject the
tape when a volume is full, and try to reopen the tape drive for 2 mn.
To be used with tape changers which load the next tape when the current one is
ejected.
While I'm there fix eject handling for remote tape.
2001-12-14 14:43:33 +00:00
wiz
ed5ba510c2 One '\' too many. 2001-12-07 19:50:20 +00:00
lukem
29d31edd5f relax the restriction on -F that the file system image argument must be a
regular file
2001-11-16 04:41:23 +00:00
lukem
4c4307e3ce fix -Wshadow warnings 2001-11-01 08:03:03 +00:00
lukem
ca2a1a8c3b in msg(), don't call va_list using functions twice in a row without calling
va_start() in between; reorder code so that we call vsnprintf and then
just fputs that buffer. crank the size of lastmsg whilst we're here
problem noted by Hideo Saito in [bin/14348].
2001-10-25 08:04:27 +00:00
wiz
699d58b177 Whitespace fixes, sort SEE ALSO, sort sections. 2001-10-15 13:43:06 +00:00
blymn
a152a6a92a Add the capability for dump to print timestamps on all informational
messages.
2001-10-15 13:25:33 +00:00
lukem
1b81d6353d remove third argument (`int ns') from ffs_sb_swap(), and let ffs_sb_swap()
determine the endianness of the `struct fs *o' superblock from o->fs_magic
and set needswap as necessary, rather than trusting the caller to get
it right.  invariably, almost every caller of ffs_sb_swap() was calling it
with ns set to the wrong value for ns anyway!
ansi KNF ffs_bswap.c declarations whilst here.

this fixes all sorts of problems when trying to use other-endian file systems,
notably the kernel trying to access memory *way* off, possibly corrupting or
panicing, and userland programs SEGVing and/or corrupting things (e.g,
"fsck_ffs -B"  to swap a file system endianness).

whilst the previous rev of ffs_bswap.c (1.10, 2000/12/23) made this problem
worse, i suspect that the problem was always there and previous versions
just happened not to trash things at the wrong time.

FFS_EI should now be a lot more stable.
2001-08-17 02:18:46 +00:00
lukem
b1a3e1140e - implement -F, which indicates that files-to-dump is a regular file
containing a file system image (instead of being a single file as
  part of a subtree dump)
- use "file system" instead of "filesystem" or "file-system"
2001-08-14 06:51:36 +00:00
lukem
d5eaa32503 s/filesystem/file system/ 2001-08-14 05:44:44 +00:00
lukem
b00117c331 s/filesystem/file system/dump.h 2001-08-14 05:44:15 +00:00
david
a84be23c10 Patch to drop setgid tty privs until forking for operator notification 2001-08-08 16:49:54 +00:00
mrg
d699caad5a reset uid & gid around calling rmthost(). 2001-07-17 10:56:53 +00:00
mrg
5c897ed92f display what signal, not "unknown" 2001-07-16 13:30:13 +00:00
wiz
73f545bb5b Drop arguments of .Os. 2001-06-05 11:22:41 +00:00
hannken
de85f7e43e Assign a saved copy of dt->fs_file to mountpoint. dt->fs_file will be freed
otherwise resulting in a wrong spcl.c_filesys .
2001-06-03 09:51:10 +00:00
lukem
9af1692ef1 * improve parsing of file-systems-to-dump when a path is given:
- if it's a path to an unmounted file-system listed in /etc/fstab, use
	that instead of assuming the user wanted a subtree dump of the parent
	directory. this restores the behaviour of dump before the subtree
	dumping code went in.
      - if it's a path to a mounted file-system which is not in /etc/fstab,
	use the info from getmntinfo(3). previously, dump would choke.
* implement error checked malloc(), calloc(), strdup(), and use
  appropriately (some of the calloc()s weren't being checked)
* use 'file-system' instead of 'filesystem' in the man page
2001-05-28 01:09:54 +00:00
lukem
cc5935ebba unifdef !__STDC__ (missed in previous) 2001-05-28 00:41:14 +00:00
lukem
713ffa0ec4 more KNF 2001-05-27 15:07:34 +00:00
lukem
99feaf5b29 knf to ansi 2001-05-27 14:17:56 +00:00
lukem
e7bcd6bf17 use strdup appropriately 2001-05-26 07:48:15 +00:00
tron
b82fe09a8d Add "e" option to usage message. Problem pointed out by Takahiro Kambe
in private e-mail.
2001-05-12 10:26:22 +00:00
tron
b72a1f53d6 Fix bug in new "e" option: only eject tape if it is full, not if the dump
was finished.
2001-05-12 08:03:01 +00:00
tron
d6be44d3c8 Add a new option "e" to "dump" which allows to eject tapes automatically
if a tape change is required.
2001-05-07 21:17:48 +00:00
christos
b9140b5b9f restore needs the rcmd operations. 2001-02-04 21:37:29 +00:00
christos
91a0880aad fix redundant decls 2001-02-04 21:33:19 +00:00
scw
e89e2124d1 Global variables don't need to be initialised to zero. 2000-12-13 22:45:12 +00:00
scw
8c5df3aa33 `dev_bsize' needs to be declared extern. 2000-12-13 22:44:44 +00:00
he
ecaef6e7a4 Better fix for format warnings.
The type of time_t varies between ports, so we need to cast
before printing.  It appears to be sufficient and safe to use (int).
2000-10-11 20:25:29 +00:00
briggs
1e8e167a26 Fix format warnings 2000-10-11 04:57:42 +00:00
is
9979da6cbb Format string cleanups by Bill Sommerfeld. 2000-10-10 20:24:49 +00:00
perseant
2763cc1921 Working version of aborted dump{,_lfs} join. 1999-10-01 04:35:21 +00:00
perseant
e8247b4092 Back out changes made on the 29th, not at all the changes I intended to commit.
(I don't know how I did it though ... I'll figure it out tonight.)
I'll reapply this, in a working form, this evening.
1999-09-30 20:39:58 +00:00
perseant
54fd3dd508 Adapt dump(8) to use filestore-independent (but still ufs-specific)
replacements for NINDIR, fsbtodb, etc.  Create dump_lfs by adding a few
LFS-filestore-specific routines.  As described in PR#8317.
1999-09-29 04:57:48 +00:00
abs
125cb421d5 Note the default tape device is taken from _PATH_DEFTAPE in /usr/include/paths.h 1999-07-01 19:18:47 +00:00
abs
f6e78dac05 Default device is nrst0 not rst0 1999-06-28 01:32:49 +00:00
sommerfe
3a1d0ae5c7 Avoid byte overflow in block estimate for large files 1999-05-05 16:53:46 +00:00
bouyer
491d912f59 Implement a read cache, as announced on tech-userlevel. Default is 32k
read buffer size, 512 buffer or 15% of the user memory. Can be changed
with the -k and -s options.
1999-03-23 14:22:59 +00:00
bouyer
1746034b3e Handle "nodump" flag on directories, by not dumping any files or directories
under it. Based on some parts of PR 6705 by Brian Grayson.
In the Makefile, add (commented out) debug options that can be turned on.
1999-03-09 17:25:52 +00:00
mycroft
f6590b22cd Clean up SYNOPSIS formatting. 1999-03-07 11:02:05 +00:00
bouyer
3e3f9c7795 #include machine/bswap.h and remove -lutil. 1999-01-15 13:32:05 +00:00
lukem
5b05a0328e s/1998/1999/ 1999-01-03 14:33:44 +00:00
lukem
2faa2d1ff5 add support for '-L label', which file(1) and restore(1) can extract from the
header. mostly based on [bin/6715] from Brian Grayson <bgrayson@ece.utexas.edu>

old filesystems don't have fs_qbmask and fs_qfmask set in the superblock;
fudge them as per code in /sys/ufs/ffs/ffs_vfsops.c::ffs_oldfscompat().
bug and suggested fix from Robert Elz <kre@munnari.OZ.AU> in [bin/6610]
    XXX: there may be other variables required as well...
1999-01-03 02:17:46 +00:00
lukem
21ae292644 add support for '-L label', which file(1) and restore(1) can extract
from the header.
mostly based on [bin/6715] from Brian Grayson <bgrayson@ece.utexas.edu>
1999-01-03 02:17:45 +00:00
tron
46ce633a7b Add reference to "st(4)" as suggested by Brian Grayson in PR bin/6713. 1999-01-02 16:28:39 +00:00