Commit graph

2812 commits

Author SHA1 Message Date
Ruslan Ermilov 32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Ruslan Ermilov 4ae29521b3 mdoc(7) police: fix markup. 2001-10-01 14:13:36 +00:00
David E. O'Brien 757eeda04b *** empty log message *** 2001-10-01 08:43:58 +00:00
Ian Dowse 2dc4ac06ce Enable bug-for-bug compatibility with mount_mfs when the program
name is "mount_mfs" or "mfs". Previously, the condition was that
the program name must start with "mount_", but this both missed
the case where mount(8) invokes mdmfs with argv[0] = "mfs", and it
included cases such as "mount_md" where compatibility is not
required.

Reviewed by:	dd
2001-09-30 15:14:16 +00:00
Ian Dowse 47f07d95ba Don't require that the special/filesystem argument translates into
a block or character device; the rest of tunefs works just fine on
filesystem images in regular files. Instead, if getfsfile() failed
and if the specified filesystem is a directory then print a more
useful "unknown file system" error.

Also, _PATH_DEV already contains a trailing slash, so don't add
another one when constructing a device path, and use errx() instead
of err() in a case where errno is meangingless.
2001-09-30 14:57:08 +00:00
Bill Fumerola b53adbbf93 now that jlemon has added a hash table to lookup locally configured ip
addresses (and the macros that ipfw(4) use to lookup data for the 'me'
keyword have been converted) remove a comment about using 'me' being a
"computationally expensive" operation.

while I'm here, change two instances of "IP number" to "IP address"
2001-09-29 06:33:42 +00:00
Luigi Rizzo 830cc17841 Two main changes here:
+ implement "limit" rules, which permit to limit the number of sessions
   between certain host pairs (according to masks). These are a special
   type of stateful rules, which might be of interest in some cases.
   See the ipfw manpage for details.

 + merge the list pointers and ipfw rule descriptors in the kernel, so
   the code is smaller, faster and more readable. This patch basically
   consists in replacing "foo->rule->bar" with "rule->bar" all over
   the place.
   I have been willing to do this for ages!

MFC after: 1 week
2001-09-27 23:44:27 +00:00
Ian Dowse 2510719736 The -A option (beep when packets are dropped) didn't work quite
right; after a single packet was dropped it beeped after every
transmission.

Change its implementation to only output a bell when there is an
increase in the maximum value of the number of packets that were
sent but not yet received. This has the benefit that even for very
long round-trip times, ping -A will do roughly the right thing
after a few inital false-positives.

Reviewed by:	ru
2001-09-25 20:22:33 +00:00
Robert Watson 2d742f7bbc o Reduce userland inclusion of kernel headers -- remove unneeded include
of <sys/mbuf.h>.

Reviewed by:	jlemon
2001-09-24 15:00:16 +00:00
Luigi Rizzo 32f967a3c0 A bunch of minor changes to the code (see below) for readability, code size
and speed. No new functionality added (yet) apart from a bugfix.
MFC will occur in due time and probably in stages.

BUGFIX: fix a problem in old code which prevented reallocation of
the hash table for dynamic rules (there is a PR on this).

OTHER CHANGES: minor changes to the internal struct for static and dynamic rules.
Requires rebuild of ipfw binary.

Add comments to show how data structures are linked together.
(It probably makes no sense to keep the chain pointers separate
from actual rule descriptors. They will be hopefully merged soon.

keep a (sysctl-readable) counter for the number of static rules,
to speed up IP_FW_GET operations

initial support for a "grace time" for expired connections, so we
can set timeouts for closing connections to much shorter times.

merge zero_entry() and resetlog_entry(), they use basically the
same code.

clean up and reduce replication of code for removing rules,
both for readability and code size.

introduce a separate lifetime for dynamic UDP rules.

fix a problem in old code which prevented reallocation of
the hash table for dynamic rules (PR ...)

restructure dynamic rule descriptors

introduce some local variables to avoid multiple dereferencing of
pointer chains (reduces code size and hopefully increases speed).
2001-09-20 13:52:49 +00:00
Peter Wemm 12f8604fde Deal with nfs server module changes for autoloading. 2001-09-20 02:18:06 +00:00
Peter Wemm 4a0785aaff Deal with module name changes and autoloading. 2001-09-20 02:15:17 +00:00
Ruslan Ermilov 4387c7c2af Non-decimal ``skipto'' rule numbers are meaningless.
Noticed by:	"Marc G. Fournier" <scrappy@hub.org>
MFC after:	3 days
2001-09-19 15:12:14 +00:00
Peter Wemm 9119623471 Userland part of nfs client/server split and cleanup. 2001-09-18 23:34:44 +00:00
Jonathan Lemon 5fc10eaf8e Split hwcsum into rxcsum and txcsum components. 2001-09-18 20:13:48 +00:00
Jonathan Lemon f35b9d165f Teach ifconfig about the new interface capability words. 2001-09-18 17:43:30 +00:00
Andrew Gallatin c97e08fb94 fix savecore so that it works on the alpha after the size change
of dumpmag from an int to a u_long in rev 1.41 -- without this
change, savecore will always fail like this:

#savecore -v /var/crash
dumplo = 874356736 (1707728 * 512)
savecore: magic number mismatch (8fca0101 != 8fca0101)
savecore: no core dump
2001-09-13 21:19:13 +00:00
Ruslan Ermilov cda2a9b2f0 Set BINOWN=root explicitly for setuid root binaries.
This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.
2001-09-13 06:48:18 +00:00
Ruslan Ermilov 69f568ec4d Use ${MACHINE}, it works with cross-builds. 2001-09-12 12:21:08 +00:00
Ruslan Ermilov 8083488514 mdoc(7) police: restore fix in rev. 1.52; .Dt should be in CAPITALS. 2001-09-11 10:00:48 +00:00
Ruslan Ermilov e8ae41c3db mdoc(7) police: restore the correct sorting of SEE ALSO. 2001-09-11 09:58:34 +00:00
Ruslan Ermilov 35ef781131 mdoc(7) police: markup nits, improve -W option text,
mount_msdos(8) is called mount_msdosfs(8) nowadays.
2001-09-11 09:57:31 +00:00
Ruslan Ermilov 5788dd0ee8 Removed -M and -N from getopt(3) call as well. 2001-09-11 09:49:36 +00:00
Greg Lehey 65aeaec006 Use a better stripe size in the examples.
Noted by:	Sean Eric Fagan <sef@kithrup.com>
2001-09-09 02:23:06 +00:00
Semen Ustimenko cc6b9b02be Stole unicode translation table from mount_msdos. Add kernel code
to support this translation.

MFC after:	2 weeks
2001-09-08 23:03:52 +00:00
Kris Kennaway dff462c363 * Switch from doing compress(1)ed crashdumps with the -z flag to using
gzip(1).  gdb doesn't understand these, but then again it didn't
  understand compressed crashdumps either.
* Change a stray lseek() into a Lseek()
* Remove the extraneous prototype for log() which has apparently never
  existed in FreeBSD's sources

Obtained from:  NetBSD (partially)
MFC after:      2 weeks
2001-09-06 09:30:09 +00:00
Dima Dorfman f328d583a2 Use CFLAGS, not COPTS, in the Makefile. bsd.prog.mk conveniently adds
COPTS towards the end of final CFLAGS so that it can be used to
override Makefile and other defaults.  Using it in Makefiles risks
having options set using it clobbered when somebody uses it on the
command line.

Approved by:	bde
2001-09-05 20:10:59 +00:00
Ruslan Ermilov 4a315a9af3 SECURITY.
Notify operators using wall(1)'s -g option.
Drop ``setgid tty'' privilege.

Obtained from:	OpenBSD
MFC after:	1 month
2001-09-05 15:37:01 +00:00
Ruslan Ermilov 857dcea0fe The defaults for bsize and fsize were interchanged.
PR:		docs/30330
2001-09-05 08:51:21 +00:00
Ruslan Ermilov d6669bbcc2 Don't reinvent the wheel; use strptime(3).
MFC after:	2 weeks
2001-09-04 16:17:17 +00:00
Ruslan Ermilov ee355dcb9e mdoc(7) police: removed hard sentence breaks. 2001-09-04 09:28:48 +00:00
Poul-Henning Kamp ae919cce4a Duh! forgot this bit of the NCCD patch.
Submitted by:	sobomax
Reviewed by:	phk
2001-09-04 09:19:48 +00:00
Murray Stokely cc2a5b08a7 Mention collision attacks on MD5. From the md5(3) man page.
PR:		docs/14158
Reviewed by:	kris
Submitted by:	Eric Frias <efrias@sg505.net>
2001-09-04 01:01:07 +00:00
Jonathan Lemon 050783e980 IPFilter source code in contrib/ipfilter apparently can't make up its mind
where the headers should live, as the code references both "ip_fil.h" and
"netinet/ip_fil.h" (among others).  As a consequence, put both
sys/contrib/ipfilter and sys/contrib/ipfilter/netinet to the include path
so either variant works.

PR: 29384
Pointed out by: Thomas.Quinot@Cuivre.FR.EU.ORG
2001-09-03 16:37:16 +00:00
Ruslan Ermilov 3b7e5ccc6a SECURITY: Drop `setgid kmem' bit as early as possible. 2001-08-31 16:26:37 +00:00
Ruslan Ermilov 162c0b2eff Synch with NetBSD and OpenBSD.
Allow non-superuser to open, listen to, and send safe commands on the
routing socket.  Superuser priviledge is required for all commands
but RTM_GET.

Lose `setuid root' bit of route(8).

Reviewed by:	wollman, dd
2001-08-31 12:31:09 +00:00
Ruslan Ermilov 860ca8fd85 restore(8) doesn't need to be setgid `tty', and never did.
At the times, restore(8) and rrestore(8) were the different
utilities.  rrestore(8) was installed setuid `root', while
restore(8) with usual ownership and privileges.  Later on,
on August 28, 1991 (what a coincidence!), rrestore(8) code
was merged with restore(8).  The setgid `tty' bit then was
accidentally put.
2001-08-30 09:18:55 +00:00
Peter Wemm 241ca2287a Banish hard-coded KERNBASE references from savecore. Dynamically
adjust to whatever kernbase is in the kernel that we are dumping.
2001-08-24 09:26:17 +00:00
Yaroslav Tykhiy b8a7fd3f3f `create'' and `destroy'' are command modifiers (.Cm), not flags (.Fl). 2001-08-22 18:37:47 +00:00
Ruslan Ermilov 265c01df49 mdoc(7) police: Fixed broken xrefs. 2001-08-22 14:16:31 +00:00
Brian Somers 9cfe90fe1f Handle snprintf() returning < 0 (not just -1)
MFC after:	2 weeks
2001-08-20 14:53:05 +00:00
Brian Somers 327e849ae1 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 12:56:45 +00:00
Dima Dorfman a5ef8459cc Fix grammar. 2001-08-20 02:16:41 +00:00
Dima Dorfman b9595aa55f Respect the -N flag when changing directory attributes in setdirmode).
PR:		29671
Submitted by:	Sascha Blank <sblank@addcom.de>
2001-08-20 02:15:22 +00:00
Kris Kennaway 5979df34a6 Silence non-constant format string warnings by marking functions
as __printflike()/__printf0like(), adding const, or adding missing "%s"
format strings, as appropriate.

MFC after:	2 weeks
2001-08-19 08:19:37 +00:00
Brooks Davis 1ce95f7862 Actuall make plumb work in addition to create as per the manpage.
PR:		bin/29812
Submitted by:	Joao Carlos Mendes Luis <jonny@eng05.embratel.net.br>
2001-08-17 22:16:11 +00:00
Ruslan Ermilov f1845f5ba8 mdoc(7) police: restore markup bit that got accidentally lost in rev. 1.44. 2001-08-16 11:31:18 +00:00
Ruslan Ermilov 9916c5d299 mdoc(7) police: replace \*(Ba' with a simple |', it's handled specially. 2001-08-16 11:09:00 +00:00
Ruslan Ermilov 6a68a83e56 mdoc(7) police: Section cross-references are marked with .Sx.
-compat is not a valid keyword.
2001-08-16 07:43:16 +00:00
Dima Dorfman f7acb7e404 Implement a better compatibility mode with mount_mfs. It is the
default if the executable is named (called as) "mount_*", or can be
enabled with the -C option.  This allows users to leave their old
fstab entires unchanged (modulo symlink'ing mdmfs to mount(md|mfs))
and have things behave the way they should (by emulating mount_mfs
silliness), while still allowing mdmfs to be used as a generic
make-an-md-and-mount-it type thing.

Right now, the only effects of this option is to set the mount-point
mode to 01777 as if "-p 1777" was given, and to complain about getting
command-line options that mount_mfs didn't take (e.g., -X, -L, et al).
The latter is mostly to try to catch operator errors.

Also implement -U, which turns on soft-updates.  It's redundant (since
softdep is the default), but implement it anyway for compatibility.
2001-08-16 02:40:29 +00:00
Ruslan Ermilov d628d776c4 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
David E. O'Brien 94ddc5afe9 style(9) tweak
Approved by:	dd
2001-08-14 14:14:20 +00:00
Ruslan Ermilov 753d686d34 mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
Peter Wemm 98815cc740 ftrace is already initialized 2001-08-13 21:56:09 +00:00
Ruslan Ermilov c5e7e03a14 Spell "FreeBSD" with "F" and "BSD" in uppercase. 2001-08-13 16:33:00 +00:00
Ruslan Ermilov 8af1452cf8 Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
Maxim Sobolev 4afde8553d Honour `TMPDIR' environment variable.
Reviewed by:	ru
Approved by:	ru
MFC after:	2 weeks
2001-08-13 09:20:15 +00:00
Kris Kennaway 12205948f1 Don't hard-code BINOWN and BINGRP (BINGRP was hard-coded to 'bin', which
is the wrong value on FreeBSD).

MFC after:	1 week
2001-08-11 07:11:14 +00:00
Kris Kennaway eb1d91d1c9 Mark some functions as __printflike()
MFC After:	1 week
2001-08-10 23:12:10 +00:00
Ruslan Ermilov 94ba280c59 mdoc(7) police: join split punctuation to macro calls. 2001-08-10 17:35:21 +00:00
Ruslan Ermilov c75526d5a0 mdoc(7) police: fixed the "new sentence" bogons. 2001-08-10 15:03:10 +00:00
Ruslan Ermilov 57e4378bf6 mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
Ruslan Ermilov b87581119e mdoc(7) police: removed (now gratuitous) .Xo/.Xc brackets. 2001-08-10 10:41:30 +00:00
Ruslan Ermilov 8547e8b554 mdoc(7) police: spelling, punctuation and markup nits. 2001-08-10 10:15:41 +00:00
Ruslan Ermilov 2a3c2c7651 mdoc(7) police: compute the exact tag width. 2001-08-10 10:09:00 +00:00
Dima Dorfman 1f240b4c65 Document how to cancel a scheduled shutdown.
Obtained from:	OpenBSD
2001-08-09 06:27:32 +00:00
Christoph Herrmann 5455cc1ae9 fixing a bug in test mode (growfs -N)
Submitted by: 	Chris Boltwood <chris@hiendmedia.com>
Reviewed by:	tomsoft
MFC after:	5 days
2001-08-08 21:45:42 +00:00
Sheldon Hearn d118197980 Add mention of /var/run/dmesg.boot.
Yes, this isn't really the right place for it.  No, it really can't
remain undocumented.
2001-08-08 21:02:55 +00:00
Sheldon Hearn 42abf713c9 can not -> cannot 2001-08-08 18:32:06 +00:00
Dima Dorfman 3fa96e6678 Move all the prototypes to one place. 2001-08-07 19:27:46 +00:00
Dima Dorfman 26a0ee75c6 Introduce a force option, MD_FORCE, that instructs the driver to
bypass some extra anti-foot-shooting measures.  Currently, its only
effect is to allow detaching a device while it's still open (e.g.,
mounted).  This is useful for testing how the system reacts to a disk
suddenly going away, which can happen with some removeable media.

At this point, the force option is only checked on detach, so it
would've been possible to allow the option to be passed with the
MDIOCDETACH operation.  This was not done to allow the possibility of
having the force flag influence other tests in the future, which may
not necessarily deal with detaching the device.

Reviewed by:	sobomax
Approved by:	phk
2001-08-07 19:23:16 +00:00
Ruslan Ermilov c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Stephen McKay bfc03b187c Spelling. 2001-08-07 11:09:17 +00:00
Hajimu UMEMOTO 232bdaf61f printed current sequence number of the SA. accordingly, changed
into sadb_x_sa2_sequence from sadb_x_sa2_reserved3 in the sadb_x_sa2
structure.  Also the output of setkey is changed.  sequence number
of the sadb is replaced to the end of the output.

Obtained from:	KAME
2001-08-06 19:40:01 +00:00
Ruslan Ermilov f47a6dce89 Fixed one more breakage introduced in 1.103 cleanup.
ICMP types were reported incorrectly:

# ipfw add allow icmp from any to any icmptypes 0,8

PR:		bin/29185
Submitted by:	Mike Durian <durian@boogie.com>
2001-08-06 13:03:38 +00:00
Ian Dowse 6369218752 Fix a number of bugs and annoyances in fdisk, many of which were
pointed out by bde:
- Ask for user confirmation before adjusting to a head/cylinder
  boundary (only when running interactively), and separate this
  adjustment from the automatic calculation of c/h/s parameters.
- In sanitize_partition, don't change any values in the slice until
  we know that the automatic adjustment will succeed.
- When auto-adjusting, ignore unused slices and give an appropriate
  error for other zero-size slices depending on the cause.
- Change dos() to do all of the c/h/s calculations for a whole slice;
  this fixes a bug where the ending c/h/s of an unused slice was set
  incorrectly.
- When changing the active slice, detect the currently active slice
  number instead of always defaulting to slice 4.
- Call fflush(stdout) before calling fgets().
- Test for fgets() returning NULL so we don't loop on EOF.

Reviewed by:	bde
2001-08-05 16:24:13 +00:00
Thomas Moestl c4a5ef6ef3 Add some features to libdevstat, and overhaul the interface a bit:
1.) prefix all functions in the library with devstat_ (compatability
    functions are available for all functions that were chaned in an
    incompatible way, but are deprecated).
2.) Add a pointer to a kvm_t as the first argument to functions that
    used to get their information via sysctl; they behave the same
    as before when NULL is passed as this argument, otherwise, the
    information is obtained via libkvm using the supplied handle.
3.) Add a new function, devstat_compute_statistics(), that is intended
    to replace the old compute_stats() function. It offers more
    statistics data, and has a more flexible interface.

libdevstat does now require libkvm; a library depedency is added, so
that libkvm only needs to be explicitely specified for statically linked
programs.
The library major version number is bumped.

Submitted by:	Sergey A. Osokin <osa@freebsd.org.ru>, ken (3)
Reviewed by:	ken
2001-08-04 18:25:48 +00:00
Yaroslav Tykhiy 2a6bc06445 Document the deprecated `-w' option in the COMPATIBILITY section. 2001-08-02 12:38:23 +00:00
Sheldon Hearn 86f478757a MFS: in HISTORY section, fix release number of first appearance 2001-08-01 12:15:21 +00:00
David E. O'Brien 57a72165c7 style(9) 2001-08-01 07:05:51 +00:00
David E. O'Brien b1161924f8 This is actually making its enterance in FreeBSD 4.4. 2001-08-01 05:53:12 +00:00
Yaroslav Tykhiy 7e7cdfa09d Since the ``-w'' sysctl(8) option has been deprecated,
don't mention it in the manpages.
2001-07-30 14:18:14 +00:00
Dima Dorfman ab1d004fd0 Document -X.
Submitted by:	kris
2001-07-30 09:13:21 +00:00
Dima Dorfman d69f5dee04 Nuke my e-mail address since it seems out of place here. 2001-07-30 09:11:17 +00:00
Andrey A. Chernov f7ed20a0bc Add KOI8-U tables
Submitted by:	Olexander Kunytsa <kunia@istc.kiev.ua>
2001-07-28 20:50:21 +00:00
Hajimu UMEMOTO 59e7e5d169 ifconfig if0 netmask xxx.xxx.xxx.0 didn't change the netmask.
PR:		bin/28833
MFC after:	3 days
2001-07-26 16:44:19 +00:00
Sheldon Hearn e1b4d8d074 Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.

Submitted by:   David Hill <david@phobia.ms>
2001-07-26 11:02:39 +00:00
Brooks Davis a341cbc3fa Fix a stupid bug which resulted in a blank line in the status output if
WEP is supported, but not keys are set.

MFC after:	3 days
2001-07-25 05:52:19 +00:00
Kris Kennaway 55fd28c86b sprintf -> snprintf
Obtained from:	OpenBSD
MFC After:	1 week
2001-07-24 11:40:18 +00:00
Kris Kennaway 56bded8a29 s/adress/address/
Inspired by:    OpenBSD
MFC After:      1 week
2001-07-23 12:05:27 +00:00
Ian Dowse afe1ef249f Fix some bugs and general brain damage in mounttab:
- Declare mtabhead as an extern in mounttab.h and define it only in
  mounttab.c.
- Remove shared global `verbose' and instead pass it as a parameter.
- Remove the `mtabp' argument to read_mtab(). It served no purpose
  whatsoever, although read_mtab() did use it as a temporary local
  variable.
- Don't check for impossible conditions when parsing mounttab, and
  do detect zero-length fields.
- Correctly test for strtoul() failures - just testing ERANGE is wrong.
- Include a field name in syslog errors, and avoid passing NULL to
  a syslog %s field.
- Don't test if arrays are NULL.
- If there are duplicates when writing out mounttab, keep the last
  entry instead of the first, as it will have a later timestamp.
- Fix a few formatting issues.

Update rpc.umntall and umount to match the mounttab interface changes.
2001-07-22 12:17:51 +00:00
Crist J. Clark ed41e60f75 Error messaging in ipfw(8) was out of hand, almost 50 lines of usage
information for any command line error, the actual error message
almost always (and sometimes irretrievably) lost scrolling off the top
of the screen. Now just print the error. Give ipfw(8) no arguments for
the old usage summary.

Thanks to Lyndon Nerenberg <lyndon@orthanc.ab.ca> for the patch and
PR, but I had already done this when ru pointed out the PR.

PR:		bin/28729
Approved by:	ru
MFC after:	1 week
2001-07-22 06:40:11 +00:00
Ian Dowse 13e2e1affa Include the remote hostname in RPC-related warning messages. Exit
immediately if a host specified by the -h flag cannot be parsed
instead of attempting to unmount all NFS filesystems, which was
bad.

Add a missing return statement at the end of checkname(); this
could result in a non-zero exit status in some cases even if the
unmount succeeded.

Group two separate NFS-related operations into one block to make
it more obvious that a variable (hostp) is not dereferenced when
uninitialised. Initialise it to NULL anyway to avoid a warning.

Pass in the read_mtab()'s bogus argument as NULL instead of messing
with a local variable to achieve the same effect. A later commit
will clean up this mounttab interface.
2001-07-22 00:45:29 +00:00
Ian Dowse 2bc53e1178 Change the foreground mount behaviour so that we keep retrying
forever by default. This matches what mount_nfs did before revision
1.40, and it is the generally expected behaviour for NFS mounts.

Document the current defaults near the start of the man page and
mention the options that can be used to change them.

Discussed on:	-hackers
2001-07-21 15:38:37 +00:00
David E. O'Brien b5cd49315a Dike out the IPX bits if RELEASE_CRUNCH is defined. 2001-07-21 00:35:11 +00:00
David E. O'Brien 90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Ian Dowse e16873dad6 Since revision 1.40/1.41, the default behaviour for mount_nfs is
to give up after one attempt unless a background mount is requested.
Background mounts would retry 10000 times (at least 7 days) before
giving up.

For some situations such as diskless terminals, an NFS filesystem
may be critical to the boot process, so neither the "try once" nor
background mounts are appropiate. To cater for this situation,
unbreak the -R (retry count) parameter so that it also works in
the non-background case. Interpret a zero retry count as "retry
forever".

The defaults are now "try once" for non-background mounts and "retry
forever" for background mounts; both can be overridden via -R.
Add a description of this behaviour to the manpage.
2001-07-19 21:11:48 +00:00
David E. O'Brien f5619a236b Document "-F". 2001-07-19 17:06:19 +00:00
David E. O'Brien a88a254b1a Change exit return value to better match fsck_ffs(8). 2001-07-19 17:06:08 +00:00
David E. O'Brien c8fb766dde Recognize the "-F" option which requests whether the filesystem needs to
be cleaned immediately in foreground, or if its cleaning can be deferred
to background.

Submitted by:	Maxime Henrion <mux@qualys.com>
2001-07-19 16:45:45 +00:00
Dima Dorfman 10b0e058bb Use MD_NAME and MDCTL_NAME constants where appropriate. 2001-07-18 13:32:38 +00:00
Ruslan Ermilov 504dd5eab0 fdisk(8): document the default for -b, add xref to boot0cfg(8).
boot0cfg(8): add FILES section.

Reviewed by:	rnordier
2001-07-18 07:12:46 +00:00
Dima Dorfman 03578dfec7 Sort options in DESCRIPTION. 2001-07-15 14:00:19 +00:00
Dima Dorfman 478810b578 Bump date for addition of -D. 2001-07-15 13:57:06 +00:00
Dima Dorfman b91c884fda Set WARNS=2 on programs which compile cleanly.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-15 10:30:46 +00:00
Dima Dorfman f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Dima Dorfman 7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Dima Dorfman c33fa91f61 Constify, de-register-ify, and set WARNS=2.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-15 05:47:47 +00:00
Dima Dorfman 04983c4fe5 Constify, de-register-ify, __unused-ify, and set WARNS=2.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-15 05:46:07 +00:00
Dima Dorfman 8b032500b6 Constify and set WARNS=2.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-15 05:44:23 +00:00
Dima Dorfman 086ad217b2 Fix a prototype and set WARNS=2.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-15 05:41:57 +00:00
Bill Fumerola bcdb7cc8e4 add -a to usage()
Submitted by:	Ashley Penney <ashp@unloved.org>
MFC after:	3 days
2001-07-14 21:56:04 +00:00
Joerg Wunsch df77f711f3 After some (long-standing ;-) critics from Bruce, throw away the old
device search code i introduce nearly six years ago in rev 1.8.  Bruce
suggested to rather use the device name of the root filesystem instead
which is certainly the most sensible default.  Since there are many
possible cases for a root filesystem name (device with and without
slices, consider /dev/vinum/root even though it currently could not
work as such), there's some heuristic using a RE in order to find out
the canonical device name from the mounted name.  This probably won't
quite fit for a NFS root (can't test that right now), but then,
there's hard to find a good default for those machines anyway. ;-)

This unbreaks the functionality of rev 1.2 i once broke in 1.8. :)
2001-07-13 16:48:56 +00:00
Ruslan Ermilov e8b02a428d mdoc(7) police: -xwidth has been fold into -width. 2001-07-13 09:09:52 +00:00
Ruslan Ermilov 1ce90245fb Due to the documented bug in inet_aton(3), it wasn't possible
to use 0xffffffff (INADDR_NONE) as a netmask value.  The fix
is to use inet_addr(3) which doesn't suffer from this problem.

PR:		bin/28873

Also, while here, fixed the bug when netmask value was ignored
(RTF_HOST flag was set) if the "destination gateway netmask"
syntax is used, e.g. ``route add 1.2.3.4 127.1 255.255.255.255''.
2001-07-11 16:11:15 +00:00
Ruslan Ermilov acc8166aa6 mdoc(7) police: fixed markup and program name. 2001-07-11 08:51:18 +00:00
Ruslan Ermilov 9fe48c6e8d mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
Ruslan Ermilov 5bfebe7bec mdoc(7) police: minor markup tweaks. 2001-07-10 09:37:53 +00:00
Ruslan Ermilov 448087ae70 mdoc(7) police:
Restored .Pa for ``dumpdates'' (it's still a file).
Also, removed duplicate ``file'' words.
2001-07-10 09:34:55 +00:00
Crist J. Clark 9dbb5e6869 Fix rule parsing breakage introduced in 1.103 cleanup. 'tcp' and
'icmp' rules could drop into infinite loops when given bad arguments.

Reviewed by:	ru, des
Approved by:	ru
2001-07-10 05:44:51 +00:00
David E. O'Brien 863f7db9bb Fix disordering. 2001-07-09 11:06:47 +00:00
David E. O'Brien 4879cc0787 Add fsck_msdosfs 2001-07-09 11:06:21 +00:00
David E. O'Brien 0120256800 Style tweaks. 2001-07-09 10:38:15 +00:00
David E. O'Brien 0121b42aca Add fsck_msdosfs.
Obtained from:	NetBSD
2001-07-09 10:35:18 +00:00
Dima Dorfman 70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Brian Somers 7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Matthew Dillon 988d64c256 Add manual page and usage for dump -D (supplied by Dima Dorfman) (will also
be MFC'd)

Submitted by: Dima Dorfman <dima@unixfreak.org>
2001-07-09 03:06:56 +00:00
Matthew Dillon cedae1f478 Oops, forgot to add 'D' to the option morphing block. 2001-07-08 19:48:37 +00:00
Matthew Dillon 3860f7810d Add a -D option to dump, allowing the path for the /etc/dumpdates file to be
changed, so independant entities backing up the same thing to different
media can be made not to trip over each other.

MFC after: 3 days
2001-07-08 19:45:20 +00:00
Matt Jacob d389e86a04 Ian Dowse writes:
The original code was certainly broken; it knows that whereto is
	to be used for a sockaddr_in, so it should be declared as such.
	To support multiple protocols, there is also a sockaddr_storage
	struct that can be used; I don't think struct sockaddr is supposed
	to be used anywhere other than for casts and pointers.

Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
MFC after:	3 weeks
2001-07-07 19:09:21 +00:00
Matt Jacob c77eed5304 Fix unaligned access faults on alpha.
This one is strange and goes against my rusty compiler knowledge.

The global declaration

struct sockaddr whereto;

produces for both i386 && alpha:

        .comm   whereto,16,1

which means common storage, byte aligned. Ahem. I though structs
were supposed to be ALDOUBLE always? I mean, w/o pragma packed?

Later on, this address is coerced to:

		to = (struct sockaddr_in *)&whereto;

Up until now, we've been fine on alpha because the address
just ended up aligned to a 4 byte boundary. Lately, though,
it end up as:

0000000120027b0f B whereto

And, tra la, you get unaligned access faults. The solution I picked, in
lieu of understanding what the compiler was doing, is to put whereto
as a union of a sockaddr and sockaddr_in. That's more formally correct
if somewhat awkward looking.
2001-07-07 05:01:06 +00:00
Ruslan Ermilov 5521ff5a4d mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2). 2001-07-06 16:46:48 +00:00
Ruslan Ermilov 53e6653d10 mdoc(7) police: cosmetics. 2001-07-06 07:38:47 +00:00
Ruslan Ermilov b09b4efb4b mdoc(7) police: fix markup. 2001-07-05 12:37:08 +00:00
Thomas Moestl d907e410f3 Update the dmesg man page to reflect the recent changes to dmesg.
Reviewed by:	ru
2001-07-05 12:32:57 +00:00
Ruslan Ermilov def778b8fe mdoc(7) police: fixed formatting. 2001-07-05 11:22:50 +00:00
Joerg Wunsch 8de9ed220e Make open_disk() fail nicely upon encountering an ENOENT so to not
prematurely terminate the search for a usable disk.  ENOENT is quite
normal in particulare now with the advent of devfs.

While being here, also remove /dev/wd0 and /dev/od0 from the list of
disks to search since we don't have them anymore.

MFC after:	1 week
2001-07-05 10:04:43 +00:00
Dima Dorfman ffb9c240d7 Spelling police: extention -> extension. 2001-07-05 08:51:08 +00:00
Ruslan Ermilov 09915d609a mdoc(7) police:
Keep document title (.Dt) in CAPITALS, as required by the mdoc(7) manpage.
2001-07-04 14:18:31 +00:00
Ruslan Ermilov 2e453a1e33 mdoc(7) police: don't xref to itself. 2001-07-04 14:04:16 +00:00
Ruslan Ermilov a03e46ec97 mdoc(7) police: cosmetics. 2001-07-04 13:57:34 +00:00
Thomas Moestl 676adc045c Use the kern.msgbuf sysctl to get the message buffer on a running
kernel, and remove setgid kmem, which is not needed any more.
2001-07-03 19:49:31 +00:00
Yaroslav Tykhiy c3cc3cce4f Fix a typo: "must be have" -> "must have"
MFC after:	5 days
2001-07-03 15:02:36 +00:00
Dima Dorfman 6060f58628 Document continuation line support.
PR:		8479
Submitted by:	Adrian Filipi-Martin <adrian@ubergeeks.com>
2001-07-02 23:59:06 +00:00
Dima Dorfman 376f839026 Correct handling of continuation lines. Instead of treating the
backslash as nothing, treat it like a space so that adjacent lines
aren't glued together.

PR:		8479
Submitted by:	Adrian Filipi-Martin <adrian@ubergeeks.com>
2001-07-02 23:56:01 +00:00
Brooks Davis 3e61dca08d Support network device cloning via create and destroy options.
Reviewed by:	ru, ume
Obtained from:	NetBSD
MFC after:	1 week
2001-07-02 20:52:34 +00:00
Kris Kennaway bc56b93a4e Add __printflike() to those static functions which need it. 2001-07-01 23:24:27 +00:00
Dima Dorfman 7c9bebf9b3 Correct grammar. 2001-07-01 22:47:09 +00:00
Kris Kennaway 8fb0816a85 Silence format string warnings.
MFC after:	2 weeks
2001-07-01 22:00:26 +00:00
Mike Heffner be1bf707c9 Convert two instances of a lseek()+read() combination to a pread().
PR:		bin/17640
MFC after:	2 weeks
2001-07-01 04:46:20 +00:00