Commit Graph

12322 Commits

Author SHA1 Message Date
Xin LI
ded7840825 Sync with OpenBSD:
- avoid coredump when there's only one token on a line;
 - Use calloc();
 - Remove a line inherited from example mdoc.

Obtained from:	OpenBSD
MFC after:	1 month
2010-03-30 21:54:25 +00:00
Ruslan Ermilov
53d55e9756 - Handle calloc() allocation failures.
- Fixed a comment.
- 2 -> EXIT_FAILURE in some places.
- errx() -> err() where appropriate.

PR:		144644
Submitted by:	Garrett Cooper
2010-03-30 13:46:40 +00:00
Maxim Konovalov
3e6b66eecc o Remove a duplicate reference to -f flag in the SYNOPSYS section.
o Improve wording.

PR:		docs/144407
Submitted by:	gcooper
MFC after:	1 week
2010-03-30 09:22:33 +00:00
Jung-uk Kim
f46f4ae113 Print memory model of the video mode except for planar memory model.
'P', 'D', 'C', 'H', 'V' mean packed pixel, direct color, CGA, Hercules,
VGA X memory models respectively where they have fixed number of planes.
2010-03-29 20:12:44 +00:00
Fabien Thomas
9ba84a88b8 Wait for pmc name in the log before displaying data.
This will solve an abort in case of low throughput PMCs.

MFC after: 3days
2010-03-28 22:46:56 +00:00
Ed Schouten
99742a231f Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
2010-03-28 13:16:08 +00:00
Fabien Thomas
75109b48f4 Do not overflow the term in the case of multi-line display.
MFC after: 3days
2010-03-26 14:29:57 +00:00
Maxim Konovalov
a787a4cbb1 o Trim leading w/space.
PR:		docs/145030
Submitted by:	olgeni
MFC after:	1 week
2010-03-26 05:34:13 +00:00
Shteryana Shopova
438be77d54 Now actually implement reading/refreshing/returning data from the pfTablesAddrTable
and modify the BEGEMOT-PF-MIB to add support for IPV6 address' statistics in the PF
tables via pfTablesAddrNetType and pfTablesAddrNet. While here, upgrade the
pf_tree.def file to the new format that includes enumerated values. Also make sure
to return SNMP_ERR_NOSUCHNAME for ALTQ objects, if ALTQ is disabled, so that the agent
will know to skip the pfAltq subtree when servicing GETNEXT requests from SNMP clients
(otherwise snmpwalk on begemotPf would stop at the pfAltq subtree with bsnmpd returning
SNMP_ERR_GENERR).
2010-03-24 16:07:33 +00:00
Gavin Atkinson
0d0a5555c2 wollman@ has OK'd dropping his maintainership of zic(8)
Submitted by:	linimon
Approved by:	wollman (via linimon)
2010-03-20 11:05:11 +00:00
Ed Schouten
d7f1607c6a Chop off excessive long hostnames to keep the table structure intact.
This makes lastlogin(8) use exactly the same printf format as last(1).
2010-03-20 09:29:25 +00:00
Shteryana Shopova
9315567023 Make sure the snmp_pf module will first refresh its entires if necessary,
then find a specific entry, and get the requested value. So far, it found
the specific entry, refreshed the entry list if necessary, and got the
requested value from the found entry. The problem is that refreshing nukes
all old entries and replaces them with new ones and the obtained entry
pointer was no longer valid after the refresh.

Reviewed by:		bz, philip
MFC after:		1 week
2010-03-19 09:53:25 +00:00
Ed Schouten
f97f9525ba Properly progress through the list of IPv6 addresses using in6_addr size.
Right now if a jail has multiple IPv6 addresses, it will print them
shifting only 4 bytes at a time. Example:

	2001:4dd0:ff41::b23f:a9
	2001:4dd0:ff41::b23f:aa

Becomes:

	2001:4dd0:ff41::b23f:a9
	ff41::b23f:a9:2001:4dd0

By casting to in6_addr, it uses the correct offsets.

MFC after:	1 week
2010-03-18 20:13:04 +00:00
Shteryana Shopova
72d420c708 Add support for retrieving labeled pf filter rule counters.
PR:		bin/132847
Submitted by:	Szalai Andras <szalai (dot) bandi (at) gmail.com>
2010-03-18 14:54:31 +00:00
Qing Li
78f3ac9cdb Need to set the proper flag bit when inserting ARP
entries into the kernel.

MFC after:	3 days
2010-03-18 00:23:39 +00:00
Joerg Wunsch
0a47b5f57f then -> than
MFC after:	1 day
2010-03-15 16:06:52 +00:00
Doug Barton
c9bb666937 Make it more clear in the docs that -a is not compatible with -iFU,
and enforce this in the code. Apparently a lot of users mistakenly
combine -a with these flags and are then mystified that no changes
were made.

While I'm here, fix a trailing space in mergemaster.8
2010-03-14 05:22:46 +00:00
Ulrich Spörlein
63d46d1d5e Fix several typos in macros or macro misusage.
Found by:	make manlint
Reviewed by:	ru
Approved by:	philip (mentor)
2010-03-12 10:01:06 +00:00
Fabien Thomas
b44906e506 Change the way shutdown is handled for log file.
pmc_flush_logfile is now non-blocking and just ask the kernel
to shutdown the file. From that point, no more data is
accepted by the log thread and when the last buffer is flushed
the file is closed.

This will remove a deadlock between pmcstat asking for
flush while it cannot flush the pipe itself.

MFC after: 3 days
2010-03-08 19:58:00 +00:00
Fabien Thomas
2aa983e5ad Bug fixed:
- no display on serial terminal in top mode.
- display alignment for continuation string.
- correct invalid value used for display limit.

MFC after:	3 days
2010-03-05 23:08:19 +00:00
Jung-uk Kim
ca3cf4fa2c Merge ACPICA 20100304. 2010-03-05 21:39:16 +00:00
Warner Losh
515b186861 moused is useful even without usb, so remove comment asking if it is. 2010-03-04 20:31:49 +00:00
Ulrich Spörlein
7f72022f3d mount_nwfs(8): make WARNS=6 clean
uid_t and gid_t are unsigned. While initializing them to -1 and later
checking against -1 to see if they are still at their default usually
works, introduce two new flags and stop the inband signalling.

Approved by:	ed (co-mentor)
2010-03-04 16:07:14 +00:00
Xin LI
90bb63899b Make 'make manlint' happy. No actual visible change. 2010-03-03 23:11:14 +00:00
Ulrich Spörlein
7729e3ba40 Remove redundant WARNS?=6 overrides and inherit the WARNS setting from
the toplevel directory.

This does not change any WARNS level and survives a make universe.

Approved by:        ed (co-mentor)
2010-03-02 18:44:08 +00:00
Ulrich Spörlein
47e1a877c5 Always assign WARNS using ?=
- fix some nearby style bugs
- include Makefile.inc where it makes sense and reduces duplication

Approved by:	ed (co-mentor)
2010-03-02 16:58:04 +00:00
Ulrich Spörlein
bd2c49af72 rtsol(8)/rtsold(8): make WARNS=3 clean
It is actually WARNS=6 clean for non-strict alignment archs.

Approved by:	ed (co-mentor)
2010-02-27 10:19:39 +00:00
Ruslan Ermilov
c59ee18a21 Fixed static linkage. 2010-02-26 09:41:16 +00:00
Edwin Groothuis
dcfeda6122 Split the contributed code from libc/stdtime from lib/libc/stdtime
to contrib/tzcode/stdtime.
2010-02-26 06:44:00 +00:00
Edwin Groothuis
97dcdbd450 From contrib/tzcode:
The Makefiles are leftovers from the copies and should live in usr.sbin/zic/*

From usr.sbin/zic:
The sources are from a vendor contributed source, therefore should
live in contrib/tzcode/zic.
2010-02-25 21:10:27 +00:00
Ruslan Ermilov
bee10047c0 Fixed dependencies (make checkdpadd). 2010-02-25 20:24:19 +00:00
Weongyo Jeong
4f0c2fae8d Add bwn(4) driver. 2010-02-25 19:47:47 +00:00
Navdeep Parhar
5310975100 Allow cxgbtool to build with WARNS=6
MFC after:	1 week
2010-02-23 23:01:41 +00:00
Gavin Atkinson
1901b12462 Add a "-x" option to chown(8)/chgrp(1) similar to the same option in
du(1), cp(1) etc, to prevent the crossing of mountpoints whilst using the
commands recursively.

PR:		bin/130855
Submitted by:	keramida
MFC after:	1 month
2010-02-21 10:14:06 +00:00
Ulrich Spörlein
8fa03d08ca Fix common misspelling of hierarchy
Pointed out by:		bf1783 at gmail
Approved by:		np (cxgb), kientzle (tar, etc.), philip (mentor)
2010-02-20 10:19:19 +00:00
John Baldwin
fe2f808774 Fix mptutil's method for locating disk devices attached to a specific
mpt(4) controller.  Previously, the code assumed that multiple match
patterns provided to an XPT_DEV_MATCH request were ANDed together.
Instead, they are ORed.  Instead, to match peripherals for a specific bus,
one query needs to be performed to lookup the path ID of the bus.  A second
query can then be performed matching peripherals attached to that path.
This approach also makes the code a bit cleaner as the returned match
results do not mix bus and perphierals.

Reported by:	several folks
MFC after:	1 week
2010-02-19 15:16:00 +00:00
John Baldwin
5f1f6da8ba - Don't emit a warning in 'show adapter' if the IOC2 or IOC6 pages are not
present.  mpt(4) controllers that do not support RAID do not have an IOC6
  page, for example.
- Correct a check for a missing page error in a debug function.

MFC after:	1 week
2010-02-19 14:31:01 +00:00
John Baldwin
73401fbaa0 Fix a typo.
Submitted by:	Jakub Lach  jakub_lach of mailplus pl
2010-02-19 14:27:32 +00:00
Warner Losh
f77a51d7a8 Revert bogus change that snuck into r203972. 2010-02-17 06:11:05 +00:00
Warner Losh
08ab090881 The NetBSD Foundation has given permission to remove clause 3 and 4
from their liceense.

Obtained from:	NetBSD
2010-02-16 21:47:05 +00:00
Ulrich Spörlein
54673381cd Add missing newline in last line of file.
Uncovered via:	fromcvs vs. svn
Approved by:	ed (co-mentor)
2010-02-16 09:10:21 +00:00
Ruslan Ermilov
929683056e Show when an ARP entry expires.
MFC after:	1 week
2010-02-15 14:29:17 +00:00
Fabien Thomas
0b86b1bb01 - Reorganize code in 'plugin' to share log processing.
- Kcachegrind (calltree) support with assembly/source
code mapping and call count estimator (-F).
- Top mode for calltree and callgraph plugin (-T).

MFC after:	1 month
2010-02-11 22:51:44 +00:00
Warner Losh
923dd9a7a7 When you have multiple addresses on the same network on different
interfaces (such as when you are part of a carp pool), and you run
rpcbind -h to restrict which interfaces have rpc services, rpcbind can
none-the-less return addresses that aren't in the -h list.  This patch
enforces the rule that when you specify -h on the command line, then
services returned from rpcbind must be to one of the addresses listed
in -h, or be a loopback address (since localhost is implicit when
running -h).

The root cause of this is the assumption in addrmerge that there can
be only one interface that matches a given network IP address.  This
turns out not to be the case.  To retain historical behavior, I didn't
try to fix the routine to prefer the address that the request came
into, since I didn't know the side effects that might cause in the
normal case.  My quick analysis suggests that it wouldn't be a
problem, but since this code is tricky I opted for the more
conservative patch of only restricting the reply when -h is in effect.

Hence, this change will have no effect when you are running rpcbind
without -h.

Reviewed by:	alfred@
Sponsored by:	iX Systems
MFC after:	2 weeks
2010-02-09 18:10:56 +00:00
Warner Losh
b207c9d856 Anything that casts struct sockaddr * to struct sockaddr_foo is safe
due to careful design.  We've not yet figured out how to properly
annotate the sockaddr structs to communicate this to the compiler and
there's a number of constructs in the tree that make this annotation
challenging.

As such, reduce warns to 3 here because this code really isn't warns 6
safe, even if it kinda sorta appears to be on intel (which has no such
alignment restrictions).  Warns 4 adds the -Wcast-align warning.

# fixes the mips tinderbox build
2010-02-09 17:16:13 +00:00
Rebecca Cran
b5c2248595 Xorg isn't treated as a distribution, so /usr/X11R6/lib shouldn't be configured when running ldconfig.
PR:		bin/138945
Approved by:	rrs (mentor)
MFC after:	3 days
2010-02-08 21:29:34 +00:00
Martin Blapp
66df920cc9 If there is only one NIC in the system that is up and running, the
interface specifier on the command line can be ommited.

Besides of this, the bpf is being reused for each machine
that has to be woken up.

Submitted by:	Marc Balmer <marc@msys.ch>
2010-02-08 20:57:49 +00:00
Warner Losh
200ad46cd3 Initialize fromlen before calling recvfrom to avoid passing in random
stack garbage.

Obtained from:	NetBSD 1.13
2010-02-07 07:50:41 +00:00
Warner Losh
7a377edc31 Since APM is a legacy technology, that won't be adapted to other
platforms, move the test for i386 from the Makefile to powerd.c.  The
powerpc specific checks are already done this way...
2010-02-04 07:26:26 +00:00
Hajimu UMEMOTO
62fd5fd625 Exclude the interfaces which IPv6 and/or accepting RA is disabled
from the auto probed interface list.

MFC after:	1 week
2010-02-02 18:38:17 +00:00