Commit Graph

4762 Commits

Author SHA1 Message Date
wiz
e5c2f4953e Drop an unnecessary .Pp, fix a typo, use standard headers, sort sections,
mark up author name.
2001-11-25 23:30:46 +00:00
lukem
ae62d656a9 - Use strsuftoull() from dd(1) to parse numbers, rather than home grown
version. The new version supports products, 'g' (GB) and 't' (TB)
  suffices, and `b' now means `blocks' instead of `bytes'.
  Functionality requested by perry.
- debug is now a u_int instead of an int.
- Ensure that various numbers have sane upper limits (e.g, 99 for %, etc)
2001-11-25 11:22:09 +00:00
christos
607b156b2d Use SA_NOCLDWAIT to avoid zombies. 2001-11-23 17:10:29 +00:00
tron
59d12b63b8 Add a handler for SIGCHLD which collects dead childs via wait3(2) so that
"rpc.statd" won't leave zombies arround.
2001-11-22 12:23:15 +00:00
gmcgarry
8c620e9ea0 Refer to ``moused'' consistently. 2001-11-22 04:10:07 +00:00
lukem
b7eb0e9a18 reference the ufs/[uf]fs headers in ../../sys rather than using those
in /usr/include. this should make it easier to make this a host tool
2001-11-22 02:47:25 +00:00
enami
bbd072ffbb s/^\.Are/.Ar/ 2001-11-21 22:29:20 +00:00
gmcgarry
ec3da3741b Fix RCSID. 2001-11-21 21:05:41 +00:00
wiz
1fd7eeefcd "than" instead of "then". 2001-11-21 19:14:19 +00:00
wiz
55e6492076 Explicitly write explicitly without a second e. 2001-11-21 17:33:26 +00:00
itojun
f8e9dbe7d3 assume the presense of getifaddrs(3). sync with kame 2001-11-21 06:53:13 +00:00
itojun
d1fee0dd15 deal with wait3() returning -1. be careful on malloc failures. sync with kame 2001-11-21 06:52:35 +00:00
martin
b44ac684a5 Add $NetBSD$, remove unneeded includes. 2001-11-19 10:20:34 +00:00
wiz
ea7f2f8913 Add RCS Id. Add Xr in some places. Whitespace fixes, drop a .Pp.
Sort sections. Fix some typos. Sort option descriptions. Mark up paths with
.Pa. Use standard headers.
2001-11-19 10:10:45 +00:00
martin
17b08840ab Enable ifwatchd. 2001-11-19 09:45:46 +00:00
martin
c8b09ee080 New utility: ifwatchd.
Monitors the routing socket for address changes of autonomous (kernel only)
interfaces (like PPPoE) and runs up/down scripts similar to what pppd
does for its interfaces.
2001-11-19 09:43:03 +00:00
perry
fcd452088f Remove a spurious slash and clean up formatting. 2001-11-19 04:11:18 +00:00
itojun
3e54083fa3 __ss_{len,family} hack is no longer necessary 2001-11-19 03:19:10 +00:00
itojun
f559c09989 __ss_{len,family} #define hack is no longer necessary 2001-11-19 03:18:28 +00:00
augustss
2e3aacf23d Adapt to small ioctl(USB_DEVICEINFO) change. 2001-11-17 01:52:56 +00:00
itojun
b0de371030 rcsid cleanup 2001-11-16 07:10:09 +00:00
itojun
c12361e68c sync with latest kame. terminate only if ripng response is not received
for 5 seconds (or length specified by -w).
2001-11-16 07:09:36 +00:00
itojun
074a5eb23b remove LBL_ALIGN. the code leaks memory severely, and makes packet dump
incorrect.
2001-11-15 07:39:25 +00:00
enami
6737e7d6b2 Test absense of command differently to avoid null pointer deference
when only whitespaces are given.
2001-11-14 03:01:15 +00:00
itojun
d67d6cd1bb initialize sockaddr_in6 correctly. sync with kame 2001-11-14 01:56:29 +00:00
itojun
a6b4b2d5a5 use strncpy instead of strcpy, just in case. sync with kame 2001-11-14 01:55:38 +00:00
jmc
adf8bd3435 Ugg...Turn LIST_FOREACH into a while loop around LIST_NEXT...
The *_FOREACH macros got added post 1.5 and were pulled up into 1.5.2. This
makes it impossible to compile mtree local on a 1.5-release box as a cross
toolchain bit for bootstrapping to -current. (and why I never saw this problem
on my 1.5.2 machine)

This whole thing is solved via a compat lib for the tools for all netbsd bits
and/or trimming down a version of mtree to just the bits needed for building
the snapshots.
2001-11-11 05:07:20 +00:00
lukem
7c6d79f87c provide the ability to remove support for generating or checking various
digests by #define-ing NO_MD5, NO_RMD160, or NO_SHA1.  the keywords are
still parsed.
2001-11-10 14:58:20 +00:00
lukem
9a07d795e3 need <stdio.h> and <time.h> for mtree.h 2001-11-10 07:13:07 +00:00
lukem
17d6712ceb replace <sys/time.h> with <time.h> (for consistency) 2001-11-10 07:11:14 +00:00
lukem
911a933fe1 with local crc.c, don't need usr.bin/cksum in .PATH any more 2001-11-10 07:10:11 +00:00
mycroft
23b6355049 Add a separate version of the CRC routine that listens to sflag. 2001-11-10 05:10:22 +00:00
lukem
bae654cfa1 When used without -F, search for `special' in fstab and use the raw version
of the fs_spec. In any case, use opendisk(3) to open the device.

When used with -F just open `special' as-is.
2001-11-09 12:01:13 +00:00
lukem
704b08b696 Generally don't need the extra byte in MAXPATHLEN sized buffers, because
pathnames are guaranteed by POSIX to be MAXPATHLEN-1 bytes long.
Kindly pointed out by Warner Losh in private email.
2001-11-09 06:55:56 +00:00
christos
22002034fe Now that vnconfig uses opendisk(3) update it's usage encouraging use
of "vnd0" instead of "/dev/rvnd0{c,d}". Noted by tron.
2001-11-08 15:41:55 +00:00
simonb
c71f9f2709 Include <limits.h> to get LLONG_{MIN,MAX}. 2001-11-08 12:24:12 +00:00
itojun
e6ccd47666 use strncpy() to set ifname arg to ioctl. 2001-11-08 09:45:34 +00:00
tron
4c61cd90ba Don't abuse opendisk(3) to open PCI bus devices which are no disks. This
fixes PR bin/14468 by Valeriy E. Ushakov.
2001-11-08 08:05:05 +00:00
tron
316d7126f6 Try to open the file before configuring a vnode disk device to avoid silly
error messages when the file cannot be opened for some reason. This fixes
PR bin/12445 by <knotwell@ix.netcom.com>.
2001-11-08 07:44:32 +00:00
lukem
68b8babd26 sync with ufs/ufs/ufs_bmap.c rev 1.14:
- assert that ufs_getlbns() is only called for blocks which involve indirects
- use a shift instead of a multiply in one place
2001-11-08 06:10:13 +00:00
christos
271dd3ace8 Revert previous change that accepts non-raw devices as argument. The
distrib Makefiles have been adjusted appropriately. This change made
block devices and char devices look the same to the naive user, and
it is not appropriate.
2001-11-08 02:14:09 +00:00
tron
73ec93c7eb Invoke "opendisk" with "iscooked = 1" because existing makefiles and the
manual page used the block device.
2001-11-07 16:18:03 +00:00
lukem
e8b2f3326f User interface changes from (or inspired by) FreeBSD:
- Add -L to walk the tree `logically', by following symbolic links in
  the heirarchy.
- Add -P to walk the tree `physically'. This is the current behaviour,
  and the default.
- Add "-X excludes-file" to give mtree the ability to exclude files and
  directories from its traversal.  excludes-file contains fnmatch(3)
  patterns to exclude from the walk.
- Add "md5digest" synonym for "md5".
- Add "rmd160" keyword for RMD-160 message digest, and "rmd160digest" synonym.
- Add "sha1" keyword for SHA-1 message digest, and "sha1digest" synonym.
- Don't try to compare() other attributes if the type doesn't match;
  it's nothing but trouble, and no use anyway.
- In -c, only emit "/set" records if something has changed since the
  previous one.

User interface changes by me:
- Check a device's parameters before checking uid/gid/mode.
- If updating (-u), modify the following to match the specification:
	- Device type (retaining existing ownership).
	- Symlink target.

Fixes from (or inspired by) FreeBSD:
- Use p->ftslevel instead of own code to keep track of the level ourself.
  The previous code got majorly confused if fts(3) couldn't descend
  into a subdir, resulting in leaf nodes getting attached to the wrong
  directory.
  XXX: This new method is much much more robust, even though it's not 100%
  perfect; it might result in a couple of following entries in the spec
  to be incorrectly tagged as missing.
- Pass a useful pathname to rlink(), so that logical (-L) traversal
  doesn't confuse symlink checking.
- Consistently use MAXPATHLEN+1 sized buffers for pathnames, so that
  there's room for the NUL.
- Use mtree_err() and strerror(p->fts_errno) to report errors during
  the fts(3) walk.

Fixes by me:
- Remove now-unused `const char *name' argument from compare().
- Change crc_total from an int to a u_int32_t, to match usr.bin/cksum/crc.c.
- Remove trailing whitespace.
- Remove unnecessary (void) casts on functions.
- Reorder entries in the getopt() switch.
- Replace strtoq() with strtoll(), and use strtoul() appropriately.
- Renumber F_ flags to be in alphabetical order.
2001-11-07 08:01:51 +00:00
lukem
272e588400 - KNF & whitespace cleanup
- use fparseln() instead of fgetln()
2001-11-07 01:36:50 +00:00
lukem
e491f8950f Code from FreeBSD to give mtree the ability to exclude items from its traversal 2001-11-07 01:16:00 +00:00
augustss
5d206b8d31 Correct a comment. Pointed out by Michael.Eriksson@era-t.ericsson.se. 2001-11-06 22:56:02 +00:00
kim
d561c70b4b None of the other calls to logerror() include a newline at the end of the
message, and it causes an unnecessary empty line in the syslog output.
2001-11-06 05:39:27 +00:00
atatat
f5d592cf44 Add support for printing the AS number associated with the address at
each hop.
2001-11-04 23:14:35 +00:00
lukem
c55aa0f9cb - move "Wflag" global from mtree.c to spec.c, and reinstate the functionality
of tv's previous code, which skips uname or gname parsing if -W is enabled.
- rename "lineno" to "mtree_lineno", to reduce possibility of name
  clashes in code that yanks in spec.c & misc.c (unlikely, but you never know)
2001-11-03 12:51:40 +00:00
lukem
1226af2bc4 tweak copyright 2001-11-02 03:12:48 +00:00