Commit Graph

164113 Commits

Author SHA1 Message Date
Doug Barton
0ee974f9cf Blah, forgot to svn add the actual script from r223310 2011-06-19 22:59:54 +00:00
Doug Barton
d732b516ea Add the netwait rc.d script. It waits for the specified period for the
network to become active.

PR:		conf/151063
Submitted by:	Jeremy Chadwick <freebsd@jdc.parodius.com>
2011-06-19 22:48:40 +00:00
Rick Macklem
7e7fd7d177 Fix the kgssapi so that it can be loaded as a module. Currently
the NFS subsystems use five of the rpcsec_gss/kgssapi entry points,
but since it was not obvious which others might be useful, all
nineteen were included. Basically the nineteen entry points are
set in a structure called rpc_gss_entries and inline functions
defined in sys/rpc/rpcsec_gss.h check for the entry points being
non-NULL and then call them. A default value is returned otherwise.
Requested by rwatson.

Reviewed by:	jhb
MFC after:	2 weeks
2011-06-19 22:08:55 +00:00
Gavin Atkinson
f982db4aa8 Copy lukemftp to its new home, tnftp. I'm doing this in stages so as to
not confuse the CVS exporter.
2011-06-19 21:50:38 +00:00
Alan Cox
3c76db4c64 Precisely document the synchronization rules for the page's dirty field.
(Saying that the lock on the object that the page belongs to must be held
only represents one aspect of the rules.)

Eliminate the use of the page queues lock for atomically performing read-
modify-write operations on the dirty field when the underlying architecture
supports atomic operations on char and short types.

Document the fact that 32KB pages aren't really supported.

Reviewed by:	attilio, kib
2011-06-19 19:13:24 +00:00
Marcel Moolenaar
484b5c257d Add support for using mtree(5) manifest files to define the image
to be created. The support is based on mtree version 2.0, as used
in libarchive, but adds new features on top of it.

The current implementation is fully functional, but is envisioned
to grow at least the following additional features over time:
o   Add support for the /include special command so that manifest
    files can be constructed using includable fragments.
o   Add support specifying a search path to locate content files.
o   Content file filters: commands that provide file contents on
    stdout.

The manifest file eliminates the need to first construct a tree
as root in order to create an image and allows images (releases)
to be created directly from object trees and/or source trees.

Reviewed by:	deo
Sponsored by:	Juniper Networks, Inc
2011-06-19 18:34:49 +00:00
Steve Kargl
edfca01f71 In the libm access macros for the double type, z can sometimes
be used uninitialized.  This can lead to spurious exceptions
and bit clobbering.

Submitted by:	bde
Approved by:	das (mentor)
2011-06-19 17:07:58 +00:00
Jilles Tjoelker
1cbcfc538b rc.subr: Make sure all functions are under if [ -z "${_rc_subr_loaded}" ]. 2011-06-19 15:23:32 +00:00
Alexander Kabaev
472d2173ba Put a quick bandaid on internal citrus locking.
The code is not quite right still, but it programs from deadlocking
on themselves if one enables new citrus code by mistake.
2011-06-19 13:35:46 +00:00
Alexander Kabaev
e1e52afa08 Minimize backward seeks when trying to load ELF relocatable modules.
Some of loader filesystems are very ill equipped to handle seeking
backwards within the file. Namely, tftp requires trasfer to be
restarted from the start of the file every time we go backwards.
2011-06-19 13:35:41 +00:00
Alexander Kabaev
a805bbe21a Do not set thread name to less than informative 'initial thread'. 2011-06-19 13:35:36 +00:00
Simon L. B. Nielsen
86f222bbfe Do not use #warning to warn about missing implementation of dt_popc(),
but just have a comment that this is broken.

This is just a bandaid until somebody can fix this correctly.  The code
is just a broken as it was before r223262 - now buildworld just doesn't
fail.

Tested by:	i386 + amd64 buildworld
With hat:	benl co-mentor
2011-06-19 12:52:50 +00:00
Jilles Tjoelker
5062455134 rc.subr: Eliminate a fork from check_kern_features, like r223227.
MFC after:	2 weeks
2011-06-19 11:42:48 +00:00
Jaakko Heinonen
43764a7ffa Don't #undef curses ERR in dialog.h. Otherwise, the macro will be
unavailable if curses.h is included before dialog.h.

PR:		bin/156601
Obtained from:	Thomas E. Dickey (upstream maintainer)
Discussed with:	nwhitehorn
2011-06-19 08:53:16 +00:00
Hans Petter Selasky
842014b127 Add new USB ID to UDAV driver.
Submitted by:	Luiz Gustavo S. Costa <lgcosta@pfsense.org>
MFC after:	7 days
2011-06-19 08:34:10 +00:00
Jilles Tjoelker
57b1b54fdd sh: Add test for r223282. 2011-06-19 00:00:36 +00:00
Jilles Tjoelker
47e5204ee3 sh: Remove special support for background simple commands.
It expands the arguments in the parent shell process, which is incorrect.
2011-06-18 23:58:59 +00:00
Jilles Tjoelker
54b16435b7 sh: Add do-nothing -h option.
POSIX requires a -h option to sh and set, to locate and remember utilities
invoked by functions as they are defined. Given that this
locate-and-remember process is optional elsewhere, it seems safe enough to
make this option do nothing.

POSIX does not specify a long name for this option. Follow ksh in calling it
"trackall".
2011-06-18 23:43:28 +00:00
Rick Macklem
8f0e65c915 Add DTrace support to the new NFS client. This is essentially
cloned from the old NFS client, plus additions for NFSv4. A
review of this code is in progress, however it was felt by the
reviewer that it could go in now, before code slush. Any changes
required by the review can be committed as bug fixes later.
2011-06-18 23:02:53 +00:00
Jilles Tjoelker
279a233d0c libprocstat: For MAP_PRIVATE, do not consider the file open for writing.
If a file is mapped with with MAP_PRIVATE, no write permission is required
and changes do not end up in the file. Therefore, tools like fuser and fstat
should not show the file as open for writing.

The protection as displayed by procstat -v still includes write in this
case, and shows 'C' for copy-on-write.
2011-06-18 23:01:26 +00:00
Pawel Jakub Dawidek
7fc6a8aef6 Correct subcommand name 'unset' -> 'unscript'. 2011-06-18 22:32:55 +00:00
Konstantin Belousov
125c410fb2 Fix a typo in adagetattr() from r223089. In particular, this restores
the ability to use ahci(4) for kernel dumps.
2011-06-18 22:26:58 +00:00
Jilles Tjoelker
80905c3568 libprocstat: Fix typo in error messages. 2011-06-18 22:16:55 +00:00
Jilles Tjoelker
1696274411 fuser: Fix skipping "SIG" on signal names (-s).
The code did  !strncasecmp(str, "sig", 4)  which is not useful.

Also change "sig" to "SIG" matching the uppercase signal names as of
r218285. This has little effect because fuser does not enable locale.
2011-06-18 21:53:36 +00:00
Jilles Tjoelker
b0766d1fc5 libprocstat: Remove spaces between function name and open parenthesis. 2011-06-18 21:46:11 +00:00
Jilles Tjoelker
6586921454 libprocstat: Correct format for size_t (should be %zu, not %zd). 2011-06-18 21:29:25 +00:00
Kirk McKusick
9957ac07b2 Fixed dereference of a NULL pointer.
Reported by:	Peter Holm
2011-06-18 21:10:03 +00:00
Bjoern A. Zeeb
30d1616ed8 Add 'show logstate' to usage().
MFC after:	1 week
2011-06-18 21:08:27 +00:00
Doug Barton
aff92fcbb9 Add rc.d/kld to load kernel modules after local disks are up.
This method is many times faster than doing it in /boot/loader.conf.
2011-06-18 19:41:05 +00:00
Ben Laurie
5f301949ef Fix clang warnings.
Approved by:	philip (mentor)
2011-06-18 13:56:33 +00:00
Bjoern A. Zeeb
f404863979 Remove a these days incorrect comment left from before new-arp.
MFC after:	1 week
2011-06-18 13:54:36 +00:00
Bjoern A. Zeeb
930c182a06 Install symlinks for m_tag_* mbuf tag functions to the mbuf_tags.9 man page.
MFC after:	1 week
2011-06-18 13:08:46 +00:00
Bjoern A. Zeeb
dabc7ac21a Correct a typo in the function name.
MFC after:	1 week
2011-06-18 13:03:06 +00:00
Konstantin Belousov
1c23d0f727 Fix vfork. Add comments. 2011-06-18 12:13:28 +00:00
Marius Strobl
a2f43b6155 - As with stray vector interrupts limit the reporting of stray level
interrupts. Bringup on additional machine models repeatedly reveals
  firmware that enables interrupts behind our back, causing the console
  to be flooded otherwise.
- As with the regular interrupt counters using uint16_t instead of
  u_long for counting the stray vector interrupts should be more than
  sufficient.
- Cache the interrupt vector in intr_stray_vector().
2011-06-18 11:27:44 +00:00
Marius Strobl
6ce2f878d3 Merge from r161730:
o  Set TP using inline assembly to avoid dead code elimination.
o  Eliminate _tcb.

Merge from r161840:
Stylize: avoid using a global register variable.

Merge from r157461:
Simplify _get_curthread() and _tcb_ctor because libc and rtld now
already allocate thread pointer space in tls block for initial thread.

Merge from r177853:
Replace function _umtx_op with _umtx_op_err, the later function directly
returns errno, because errno can be mucked by user's signal handler and
most of pthread api heavily depends on errno to be correct, this change
should improve stability of the thread library.

MFC after:	1 week
2011-06-18 11:07:09 +00:00
Jilles Tjoelker
cfb739b854 rc.subr: Eliminate about 100 forks from the boot sequence.
With the current sh, placing eval in a command substitution always results
in a fork(), even if it is the only command and only executes a single
simple command. Therefore, avoid it where it can be avoided easily.

Side effect: values starting with a hyphen and all whitespace are preserved.
The values are defaults and names for rc.conf variables and messages to be
given about obsolete ones.

MFC after:	2 weeks
2011-06-18 11:05:30 +00:00
Marius Strobl
4a58eccc5b Add an entry for r221407 forgotten in said revision. 2011-06-18 10:48:00 +00:00
Michael Tuexen
bb3c45bf86 Document the latest changes to sctp_opt_info() in the code.
This makes sctp_opt_info() compiliant with the latest version
of the socket API ID.
2011-06-18 10:36:05 +00:00
Bjoern A. Zeeb
e08e8999f6 Add a missing ',' to separate arguments lost for r222465 only found in
case a complete world is built without INET support.

MFC after:	10 days
X-MFC with:	222465
2011-06-18 09:46:39 +00:00
Bjoern A. Zeeb
52dcd04ba3 gre(4) was using a field in the softc to detect possible recursion.
On MP systems this is not a usable solution anymore and could easily
lead to false positives triggering enough logging that even  using
the console was no longer usable (multiple parallel ping -f can do).

Switch to the suggested solution of using mbuf tags to carry per
packet state between gre_output() invocations.  Contrary to the
proposed solution modelled after gif(4) only allocate one mbuf tag
per packet rather than per packet and per gre_output() pass through.

As the sysctl to control the possible valid (gre in gre) nestings does
no sanity checks, make sure to always allocate space in the mbuf tag
for at least one, and at most 255 possible gre interfaces to detect
loops in addition to the counter.

Submitted by:	Cristian KLEIN (cristi net.utcluj.ro) (original version)
PR:		kern/114714
Reviewed by:	Cristian KLEIN (cristi net.utcluj.ro)
Reviewed bu:	Wooseog Choi (ben_choi hotmail.com)
Sponsored by:	Sandvine Incorporated
MFC after:	1 week
2011-06-18 09:34:03 +00:00
Ed Schouten
c3f1b3ae09 Let the size of the namebuf depend on the size of the ut_user field. 2011-06-18 07:47:15 +00:00
Warner Losh
cf95dbae06 More expeirmentation suggests that 10ms isn't as reliable as
previously thought, but 100ms seems to be.  Likely there's a good
middle ground, but for now be conservative.
2011-06-18 03:16:51 +00:00
Warner Losh
0b96c05a7a After we get a good power signal, always wait about 10ms before
proceeding.

On boot, some laptops with certain cards in them sometimes fail on
boot, but if the card is inserted after boot it works.  Experiments
show that small delays here makes things more reliable.  It is
believed that some combinations need a little more time before the
power on the card is really stable enough to be reliable once the
power is stable in the bridge.
2011-06-18 02:25:08 +00:00
David E. O'Brien
a57971c679 Note how wait(3) is implemented. 2011-06-18 00:53:51 +00:00
Xin LI
488d6e0c3d Sync with OpenBSD, primarily make the code easier to read, and a license
change to standard OpenBSD ISC license.

Obtained from:	OpenBSD
MFC after:	2 weeks
2011-06-18 00:33:34 +00:00
Xin LI
8e27b6e60f Sync with OpenBSD (zap rcsid).
MFC after:	2 weeks
2011-06-18 00:29:10 +00:00
Xin LI
25879947d6 The flags argument of mpool_get() is meaningful, document it.
MFC after:	2 weeks
2011-06-18 00:10:21 +00:00
David E. O'Brien
52e95a64ea Add comment from CSRG rev 7.27 (1992/06/23 19:56:55; author: mckusick) 2011-06-17 21:44:13 +00:00
Jung-uk Kim
5df88f46bb Teach the compiler how to shift TSC value efficiently. As noted in r220631,
some times compiler inserts redundant instructions to preserve unused upper
32 bits even when it is casted to a 32-bit value.  Unfortunately, it seems
the problem becomes more serious when it is shifted, especially on amd64.
2011-06-17 21:41:06 +00:00