Commit Graph

184 Commits

Author SHA1 Message Date
simonb bb850c0c5e Use HW_USERMEM64 to fetch the amount of memory available. 2003-09-13 10:59:50 +00:00
agc bf07c8719a Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:11 +00:00
lukem 9014bdbce6 * Document $RCMD_CMD in environ(7).
* Cross-reference rcmd(1), rcmd(3), and environ(7) as appropriate.

Should fix [bin/21670] from Geoff Wing.
2003-05-26 10:18:39 +00:00
fvdl 617c9472c7 Fix byteswapping issues in dirindir(); mostly from Enami Tsugutomo. 2003-05-01 11:29:55 +00:00
fvdl 161b371dad Swap the right disk block in mapdirs() for the UFS1 case. From Enami. 2003-05-01 10:59:20 +00:00
tls 539a3fbb0a The sysctl returning the amount of memory in the system returns "int",
which is silly.  Luckily, it really does return the correct result if
interpreted as an unsigned int.  This change lets dump work on 32-bit
systems that have more than 2GB of RAM.
2003-04-19 23:29:12 +00:00
fvdl 2812e7d837 Since the size passed in may be different from the fs blocksize, just
allocate a buffer each time instead of using a static one.
2003-04-08 10:02:23 +00:00
fvdl 0835d456dd dblk should be static. Fixes PR 21020, by Geoff Wing. Patch supplied
by him.
2003-04-08 09:16:19 +00:00
fvdl 42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
lukem ec029d0aa9 Use "wall -g operator" (instead of private code) to broadcast() messages to
members of the operator group.
Don't install "setgid tty", and remove now unnecessary gid/egid swapping.
Remove utmp trawling code pulled in from usr.bin/who.
The Code is now simpler, and more portable (without the utmp cruft) too.

This is derived from similar work in OpenBSD.
2003-03-27 13:56:46 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
enami 166444b3a9 No need to print same error message twice in the same line. 2003-02-06 23:25:02 +00:00
enami 8d849f483a Check lseek error correctly (i.e., use == -1 rather than < 0). 2003-02-06 23:00:08 +00:00
perry 8a49ec08e4 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-04 23:07:28 +00:00
enami c27806c8fd Fix typo I've introduced while cleaning up for commit. 2003-02-04 08:43:16 +00:00
enami 3053f5ec9b - Fix daddr_t print format inside ifdef DIAGNOSTIC.
- Start scan cache entry just filled, rather than starting from top.
2003-02-04 08:24:20 +00:00
enami c886a0529a Convert `nblksread' to in terms of device block size. This restores
originally intended behaviour (see tech-userlevel archive around 1999 March).
2003-02-04 08:11:50 +00:00
enami 799974edb6 Cosmetic changes. 2003-02-04 08:06:42 +00:00
hannken c089bab65b Merge "struct cheader" and "struct cdesc" into an union.
No more alignment problems if the alignment of these two differs.

Approved by: Manuel Bouyer <bouyer@netbsd.org>
2003-02-03 23:08:37 +00:00
fvdl a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
kleink b3df6303a9 Rename `sigset' locals to avoid symbol shadowing warning. 2003-01-16 09:38:37 +00:00
itojun bc0b132907 should be safer to cast to u_long than to cast down to int 2002-11-17 04:49:18 +00:00
tsutsui b2c857ac58 Add a cast to sizeof in printf() arg since _BSD_SIZE_T is unsigned long
on some ports.
2002-11-17 04:44:42 +00:00
itojun 94ccb14a99 use strlcpy. use sizeof() instead of xxLEN to avoid de-synchronization 2002-11-16 14:15:35 +00:00
wiz 2fb4b1db52 New sentence, new line. By Robert Elz with minimal fixes. 2002-10-01 13:40:23 +00:00
lukem 19eb88dfa1 Add fix from FreeBSD traverse.c 1.16:
Files in subdirectories of directories that have the nodump flag set
	are sometimes incorrectly being dumped.

	The problem arises because the subdirectory only gets its entry
	cleared from usedinomap if it is also present in dumpinomap, and it is
	the absence of a directory in usedinomap that internally indicates
	that the directory is under the effects of UF_NODUMP (either directly
	or inherited).

	FreeBSD PR: 32414
	Submitted by:   David C Lawrence <tale@dd.org>
2002-09-30 10:48:49 +00:00
lukem 7360d7b6ae Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path 2002-08-19 10:16:51 +00:00
yamt 41d3da5939 save/restore errno in signal handlers. 2002-08-18 08:03:35 +00:00
itojun 2abe377059 defend against malicious line in ut_line, which could cause unwanted
writes to anything under /dev.  revoke setuid/gid privs earlier.
From: xs@kittenz.org
2002-08-16 20:21:48 +00:00
christos 8e5a0987a4 support utmpx 2002-08-02 02:07:09 +00:00
wiz f26d205dbb Typo fix, from jslag@prop.walkerart.org via OpenBSD. 2002-02-26 02:00:15 +00:00
lukem 56705fb84f rcsid 2002-02-19 23:11:28 +00:00
wiz b8ed997fc6 Fix typo in macro. 2002-01-21 18:14:33 +00:00
bouyer cf39881866 For -l: specify the timeout on the command line (in seconds) instead of
hardwiring it to 2s, as suggested on tech-userlevel.
2002-01-07 17:34:08 +00:00
lukem 9dcaec9cca Add -a to "auto-size" the tape, rather than relying upon other options
to define the tape size.  Requires the tape driver to either return ENOSPC
at end of media, or 0 when a write is attempted (such as the "early warning"
support in st(4) enabled with "mt eew 1").   From FreeBSD.
2001-12-30 04:03:16 +00:00
lukem 8975510a51 Fixes from FreeBSD:
- Fix error if first tape was write protected.  Fix NetBSD PRs 4754 and 6098.
- Make dump exit codes confirm to manual page.
- Use \a instead of \7 to make noise.
- Fix estimated number of tapes for huge dumps to cartridges.
- Use <sys/queue.h> SLIST_* instead of home-rolled lists.
- Do not exit if unable to read or create /etc/dumpdates.
- Support output (tape) device returning ENOSPC for end-of-media on a write.

Fixes by me:
- Remove unused ddates_in.
- Don't dump core if SIGINFO is received before 1 second has elapsed.
- Only process SIGINFO in current "active" child.
- Don't dump core in -w if dumpdates wasn't readable and ddatev == NULL
- Minor KNF; wrap some lines
2001-12-25 12:06:26 +00:00
lukem 1f19340e88 document more of the debug options 2001-12-25 11:56:14 +00:00
lukem 1c9f606d2a For dump_lfs(8), in getfstab(), only "lfs" (instead of "ufs" or "ffs").
Fix from Minoura Makoto in [bin/10525].
2001-12-24 03:02:34 +00:00
lukem b73cca7b92 clean up from time_t -> int32_t change in dumprestore.h 2001-12-23 14:42:22 +00:00
lukem 1ab8ecafe7 unifdef sunos 2001-12-23 12:54:53 +00:00
lukem b734f790f5 nuke trailing whitespace 2001-12-23 12:29:55 +00:00
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