Commit Graph

4880 Commits

Author SHA1 Message Date
ru
0b5e9aff8c Fix malloc size (visible on amd64, with "kldconfig -r"). 2005-11-07 19:22:20 +00:00
brooks
e61dac6ecc SSIDs are of length 32-bytes and not NUL terminated. Use the correct
length and bail immediatly if the returned length is wrong rather than
attempting to set an correct value.

This commit differs from the patch in the PR in the use of exit instead
of return and the use of a defined value for the array.

Submitted by:	Daan Vreeken [PA4DAN] <Danovitsch at Vitsch dot net>
PR:		bin/74509
2005-10-30 16:31:05 +00:00
brooks
919b411586 Don't crash when given an invalid nwkey string.
PR:	misc/88159
2005-10-28 21:57:04 +00:00
ceri
a4edf83a8d gmirror.8:
Note the default balancing algorithm and stripe size.

geom_mirror.c:
  Slightly friendlier error message.

Reviewed by:	pjd
2005-10-25 13:45:07 +00:00
csjp
855920faa4 Restore the documentation about uid, gid or prison based rules requiring
that debug.mpsafenet be set to 0. It is still possible for dead locks to
occur while these filtering options are used due to the layering violation
inherent in their implementation.

Discussed:	-current, rwatson, glebius
2005-10-23 16:15:02 +00:00
dds
32e13a019e Remove a diagnostic message that can't occur: we lost the ability to
handle the old filesystem format on 2002/06/21.
2005-10-20 11:20:55 +00:00
brooks
046511ce88 Make devd WARNS=4 clean and bump WARNS accordingly. This will insure
that future variable shadowing bugs don't compile.

Reviewed by:	imp
Compiled on:	alpha i386 sparc64
2005-10-19 21:21:22 +00:00
imp
32a93330de As pointed out on current@, we don't want to declare a variable in a scope
that just uses the variable and throws it away.

This should fix the subsystem keyword wrt media-type.

MFC After: 2 days
2005-10-19 18:10:34 +00:00
stefanf
267cbf8d22 Use the new name H_SETSIZE instead of the old H_EVENT to set the history
size.

PR:	86355
2005-10-19 15:37:43 +00:00
sobomax
647fab7646 Add new option `q', which makes second stage loader quiet unless autoboot
is disabled or fails.

MFC after:	1 week
2005-10-16 01:55:35 +00:00
rse
6b2407fb76 Fix parsing of mdmfs(8) option "-w <user>:<group>" in case <user> or
<group> is a numeric user/group ID instead of a user/group name (as
explicitly intended to be allowed by both the manual page and the
implementation).

Before this fix, mdmfs(8) aborted:

| # mdmfs -s 32m -w 0:0 md /var/tmp/foo
| Assertion failed: (mip->mi_have_uid), function extract_ugid, file /usr/src/sbin/mdmfs/mdmfs.c, line 555.
| Abort trap (core dumped)

The "mi_have_[ug]id" fields were only set in case a name lookup was
successful. Instead they also have to be set in case the string to
integer conversion was successful.

Additionally, as a result of this fix, two assertions at the end of
the function are now always true and hence can be just be removed. It
is guarrantied that both the UID and the GID are set when the function
returns regularily, else it would have been already bailed out with
usage()/exit(3) or errx(3) before.

Spotted by:	Christoph Schug <chris@schug.net>
MFC after:	3 days
2005-10-14 11:21:21 +00:00
ume
d243f97483 fixed a crush when either -lh or -ls option is used.
Obtained from:	KAME
2005-10-13 18:12:46 +00:00
ume
6ff0ede0d0 setkey(8) is not WARNS=2 compliant, yet. 2005-10-13 17:57:34 +00:00
pjd
053665bac9 setkey(8) was repo-copied from usr.sbin/ to sbin/.
This will allow for NFS mount of /usr over IPsec.

Discussed on:	arch@
2005-10-12 21:40:41 +00:00
yar
633be11491 Replace "/etc/make.conf" with references to make.conf(5)
where applicable.  The main reason for this change is that
the location of make.conf is not constant and can be
modified via __MAKE_CONF.  This change also improves
hyper-text linkage in our manpages.

MFC after:	2 weeks
2005-10-10 14:55:59 +00:00
rodrigc
f2f10c6068 Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes. 2005-10-07 06:39:08 +00:00
rodrigc
66304ab826 Bump WARNS up to 3. 2005-10-07 02:22:48 +00:00
rodrigc
0b8c3193e1 In prmount(), use an unsigned int variable to eliminate
'comparison between signed and unsigned' compiler warning.
2005-10-07 02:22:04 +00:00
rodrigc
8ed272b3a6 Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes.
Make prototype in extern.h match prototype in mount_ufs.c
2005-10-07 02:18:20 +00:00
thompsa
2e47ce1265 Display the status of the spanning tree for each port.
member: xl0 flags=7<LEARNING,DISCOVER,STP>
        member: gem0 flags=7<LEARNING,DISCOVER,STP>
to:
        member: xl0 flags=7<LEARNING,DISCOVER,STP>
                port 3 priority 128 path cost 55 forwarding
        member: gem0 flags=7<LEARNING,DISCOVER,STP>
                port 1 priority 128 path cost 55 learning
2005-10-07 00:32:16 +00:00
yar
a6cc05cfd1 Eliminate some unneeded code bits. 2005-10-06 15:05:55 +00:00
imp
1edcefa858 media-type predicate is used in contexts where device-name is undefined.
In those contexted, use subsystem instead.

# This causes dhclient to run again when I plug in my ethernet cable to
# my fxp card in my laptop.
2005-10-04 22:22:51 +00:00
yar
587186ed9b Use a callback to set up a vlan interface so that "vlan"
and "vlandev" commands can be specified in any order.
This makes the code more compact and clear as well.

Improve error check on vlan argument.

MFC after:	2 weeks
2005-10-04 11:48:03 +00:00
blackend
c60b30d9e0 - s/cd0c/cd0
- Bump revision date to match many content changes since last revision
2005-10-03 17:24:51 +00:00
cognet
61fc228617 Compile fdisk for arm as well. 2005-10-03 14:22:15 +00:00
ru
fa78edf323 Document that -q option is also applicable to the "change" command.
PR:		docs/85095
Submitted by:	Rostislav Krasny
2005-10-02 12:55:34 +00:00
maxim
0433eb44c6 o Restore kerneldumpheader.architectureversion bytes swopping
mangled in rev. 1.72.

PR:		bin/86805
Submitted by:	Gavin Atkinson
MFC after:	3 days
2005-10-02 11:31:45 +00:00
glebius
fa91502026 Now ifconfig is the one right way to turn polling on. Thus, remove
the "if" clauses.
2005-10-01 19:14:34 +00:00
yar
3ddc14f22c For the sake of consistency and easier typing,
introduce "-tunnel" as an alias for "deletetunnel".
The latter is overly long and prone to typos,  but
keep it for POLA since it costs nothing.

MFC after:	5 days
2005-09-29 23:53:29 +00:00
yar
5917e3b86f Forgot to touch .Dd in the previous commit. 2005-09-29 23:39:37 +00:00
yar
090a602d2d Deprecate the useless argument to -vlandev.
Submitted by:	Fredrik Lindberg <fli+freebsd-current at shapeshifter.se> (implementation)
Reviewed by:	brooks
MFC after:	5 days
2005-09-29 23:38:24 +00:00
ru
3580b3628b err() -> errx() where appropriate. 2005-09-29 13:09:04 +00:00
pjd
2c9137ee39 Add a note in example as well, that last sector is used for metadata,
so it don't provoke confusions.

Noticed by:	Victor Sudakov <sudakov@sibptus.tomsk.ru>
MFC after:	2 days
2005-09-29 08:56:15 +00:00
tobez
86c9a041d3 Introduce "route del" as an alias to "route delete".
Reviewed by:	arch
2005-09-28 12:12:15 +00:00
mlaier
7754dd4daf Redirect bridge(4) to if_bridge(4) and rename sysctl accordingly.
Reminded by:	ru
2005-09-28 08:18:55 +00:00
ru
f47ed80aec Simplified markup. 2005-09-28 06:57:56 +00:00
pjd
917f40a3dc Update usage. 2005-09-24 08:20:45 +00:00
pjd
7386c52294 Add '-q' option, which (when used with '-m' option) just tells if the given
module is loaded or compiled into the kernel.
This is useful mostly in startup scripts, when module should be loaded only
if it wasn't compiled into the kernel nor already loaded, eg.:

	kldstat -q -m g_eli || kldload geom_eli.ko || err 1 'geom_eli module failed to load.'
2005-09-23 23:52:26 +00:00
yar
5bd0b9e954 Since special interface types get their own subsections
(not in mdoc(7) sense yet) in ifconfig(8) manpage, create such
subsections for gif(4) and vlan(4) so that their specific
options are not mixed up with general options.
2005-09-22 11:49:52 +00:00
glebius
e52ece28e9 - Understand EADDRINUSE, and forget EDQUOT. [1]
- Add description for EEXIST.
- Change description for ENOBUFS. Routing socket can return
  this error for many different reasons, including general
  memory shortage, mbuf memory shortage and rtentry zone.

PR:		kern/64090 [1]
2005-09-21 12:24:46 +00:00
delphij
5d20aabe9a Mention the default location of alternative super block on a
UFS2 file system, in fsck_ffs(8).

Submitted by:	KOMATSU Shinichiro <koma2 at lovepeers ! org>
PR:		docs/86362
MFC After:	3 days
2005-09-20 08:02:38 +00:00
nyan
0cc2091b50 Merged from src/sbin/fdisk/fdisk.c revision 1.81.
- Call gctl_free() to free resource allocated with gctl_get_handle().

MFC after:	3 days
2005-09-18 02:38:29 +00:00
rodrigc
ef8331fe9f Clarify wording for -m flag.
PR:	docs/84704
2005-09-17 15:10:39 +00:00
rodrigc
29e27ce1a6 Call gctl_free() to free resource allocated with gctl_get_handle().
PR:		bin/84664
Submitted by:	Daan Vreeken <Danovitsch at Vitsch dot net>
MFC after:	3 days
2005-09-17 14:56:10 +00:00
rwatson
f62b675f2b Add "-q" argument to sysctl(8), which suppresses a limited set of warnings/
errors generated.  In particular, it suppresses "unknown oid" when
attempting to get or set a sysctl not present in the kernel.

MFC after:	1 week
2005-09-15 16:08:04 +00:00
rse
56379f0e5b Fix system shutdown timeout handling by again supporting longer running
shutdown procedures (which have a duration of more than 120 seconds).

We have two user-space affecting shutdown timeouts: a "soft" one in
/etc/rc.shutdown and a "hard" one in init(8). The first one can be
configured via /etc/rc.conf variable "rcshutdown_timeout" and defaults
to 30 seconds. The second one was originally (in 1998) intended to be
configured via sysctl(8) variable "kern.shutdown_timeout" and defaults
to 120 seconds.

Unfortunately, the "kern.shutdown_timeout" was declared "unused" in 1999
(as it obviously is actually not used within the kernel itself) and
hence was intentionally but misleadingly removed in revision 1.107 from
init_main.c. Kernel sysctl(8) variables are certainly a wrong way to
control user-space processes in general, but in this particular case the
sysctl(8) variable should have remained as it supports init(8), which
isn't passed command line flags (which in turn could have been set via
/etc/rc.conf), etc.

As there is already a similar "kern.init_path" sysctl(8) variable which
directly affects init(8), resurrect the init(8) shutdown timeout under
sysctl(8) variable "kern.init_shutdown_timeout". But this time document
it as being intentionally unused within the kernel and used by init(8).
Also document it in the manpages init(8) and rc.conf(5).

Reviewed by: phk
MFC after: 2 weeks
2005-09-15 13:16:07 +00:00
joel
46e61fb586 Xref msdosfs(5)
Approved by:	brueffer (mentor)
2005-09-14 16:36:19 +00:00
rwatson
002afbbdf9 Don't consider being unable to open the bounds file worthy of printing
at LOG_WARNING by default; instead, consider it something to be printed
to the tty when 'verbose' mode is set.  This avoids printing out extra
lines at every boot on a system with crash dumps enabled, but that has
not yet had to generate a crashdump.

MFC after:	1 week
2005-09-13 19:15:28 +00:00
le
6675921351 Clean up.
Remove unused functions.

Reduce indentation level by reverting the logic of the enclosing
conditional statement.
2005-09-12 14:31:49 +00:00
pjd
e74d0361d3 Even if there are no valid keys in metadata, but provider is attached
we can still use setkey subcommand.

MFC after:	3 days
Found by:	regression tests
2005-09-10 07:43:03 +00:00