Warner Losh [Fri, 20 Jun 2008 16:58:15 +0000 (16:58 +0000)]
Split out the probing magic of device_probe_and_attach into
device_probe() so that it can be used by busses that may wish to do
additional processing between probe and attach.
Joerg Wunsch [Fri, 20 Jun 2008 08:39:42 +0000 (08:39 +0000)]
Make the search for sources in PATH_PORTS more accurate. I only
noticed that a "whereis -qs qemu" matched the distfiles subdir of qemu
rather than /usr/ports/emulators/qemu.
It now ignores all dot entries in /usr/ports, plus all entries
starting with a capital letter (maintenance stuff like Templates, but
also includes subdir CVS), plus /usr/ports/distfiles which is simply a
magic name in that respect.
Alan Cox [Fri, 20 Jun 2008 05:22:09 +0000 (05:22 +0000)]
Make preparations for increasing the size of the kernel virtual
address space on the amd64 architecture. The amd64 architecture
requires kernel code and global variables to reside in the highest 2GB
of the 64-bit virtual address space. Thus, KERNBASE cannot change.
However, KERNBASE is sometimes used as the start of the kernel virtual
address space. Henceforth, VM_MIN_KERNEL_ADDRESS should be used
instead. Since KERNBASE and VM_MIN_KERNEL_ADDRESS are still the same
address, there should be no visible effect from this change (yet).
Renew semaphore's pointer after wakeup since during msleep
sem_base may have been modified by destroying one of semaphores
and semptr would not be valid in this case.
Ed Schouten [Thu, 19 Jun 2008 07:30:32 +0000 (07:30 +0000)]
Remove __restrict keywords from array arguments to make GCC's -std=c99 work.
When GCC is invoked with -std=c99, the following errors are displayed when
including <spawn.h>:
/usr/include/spawn.h:69: error: static or type qualifiers in abstract declarator
/usr/include/spawn.h:69: error: static or type qualifiers in abstract declarator
/usr/include/spawn.h:72: error: static or type qualifiers in abstract declarator
/usr/include/spawn.h:72: error: static or type qualifiers in abstract declarator
We'd better remove the __restrict keywords here. The same is also done
in <regex.h>.
Submitted by: Andrzej Tobola <ato iem pw edu pl>
Reviewed by: davidxu
Approved by: philip (mentor, implicit)
Mike Makonnen [Thu, 19 Jun 2008 06:11:34 +0000 (06:11 +0000)]
Move the check for enabled knobs further down in run_rc_command() so
that bogus commands cause usage information to be printed instead of
diagnostics about enabling the knob.
John Baldwin [Wed, 18 Jun 2008 14:23:28 +0000 (14:23 +0000)]
Catch up to recentish kgdb changes:
- Use ptid_get_pid() rather than ptid_get_tid() (part of the changes to
let 'tid' work for remote kgdb).
- Add a stub kgdb_trgt_new_objfile() hook.
Weongyo Jeong [Wed, 18 Jun 2008 06:35:37 +0000 (06:35 +0000)]
handle .INF files for PCMCIA correctly that specify multiple entries in
their [Manufacturer] sections and prevent a case that NDIS_PCI_DEV_TABLE
definition was always emitted that it's only emitted once if a .INF file
is for PCI.
Marcel Moolenaar [Wed, 18 Jun 2008 01:13:34 +0000 (01:13 +0000)]
Add the set and unset verbs used to set and clear attributes for
partition entries. Implement the setunset method for the MBR
scheme to control the active flag.
Ed Schouten [Tue, 17 Jun 2008 14:05:03 +0000 (14:05 +0000)]
Don't export the unused __use_pts() routine.
The __use_pts() routine was once probably used by libutil to determine
if we are using BSD or UNIX98 style PTY device names. It doesn't seem to
be used outside grantpt.c, which means we can make it static and remove
it from the Symbol.map.
Reviewed by: cognet, kib
Approved by: philip (mentor)
David Xu [Tue, 17 Jun 2008 06:26:29 +0000 (06:26 +0000)]
Add POSIX routines called posix_spawn() and posix_spawnp(), which
can be used as replacements for exec/fork in a lot of cases. This
change also added execvpe() which allows environment variable
PATH to be used for searching executable file, it is used for
implementing posix_spawnp().
Stephan Uphoff [Mon, 16 Jun 2008 19:56:59 +0000 (19:56 +0000)]
Fix a check in SYN cache expansion (syncache_expand()) to accept packets that arrive in the receive window instead of just on the left edge of the receive window.
This is needed for correct behavior when packets are lost or reordered.
PR: kern/123950
Reviewed by: andre@, silby@
Reported by: Yahoo!, Wang Jin
MFC after: 1 week
Oliver Fromme [Mon, 16 Jun 2008 17:04:04 +0000 (17:04 +0000)]
Implement a workaround for a long-standing problem in
libi386's time(), caused by a qemu bug. The bug might
be present in other BIOSes, too.
qemu either does not simulate the AT RTC correctly or
has a broken BIOS 1A/02 implementation, and will return
an incorrect value if the RTC is read while it is being
updated.
The effect is worsened by the fact that qemu's INT 15/86
function ("wait" a.k.a. usleep) is non-implmeneted or
broken and returns immediately, causing beastie.4th to
spin in a tight loop calling the "read RTC" function
millions of times, triggering the problem quickly.
Therefore, we keep reading the BIOS value until we get
the same result twice. This change fixes beastie.4th's
countdown under qemu.
Doug Barton [Mon, 16 Jun 2008 05:48:15 +0000 (05:48 +0000)]
1. Make the BSD version of cpio the default [1]
a. The BSD version will be built and installed unless
WITHOUT_BSD_CPIO is defined.
b. The GNU version will not be built or installed unless
WITH_GNU_CPIO is defined. If this is defined, the symlink
in /usr/bin will be to the GNU version whether the BSD
version is present or not.
When these changes are MFCed the defaults should be flipped.
2. Add a knob to disable the building of GNU grep. This will
make it easier for those that want to test the BSD version in
the ports.
Randall Stewart [Sun, 15 Jun 2008 12:31:23 +0000 (12:31 +0000)]
More prep for Vimage:
- only one functino to destroy an SCTP stack sctp_finish()
- Make it so this function also arranges for any threads
created by the image to do a kthread_exit()
Tim Kientzle [Sun, 15 Jun 2008 10:45:57 +0000 (10:45 +0000)]
A number of minor corrections to the support for external compression
programs:
* Support platforms that have fork() but not vfork()
* Don't write(), select(), or poll() against closed file descriptors
Tim Kientzle [Sun, 15 Jun 2008 05:12:47 +0000 (05:12 +0000)]
Portability: We can get away with the older and better-supported
wctomb() here; we don't need wcrtomb(). In particular, this fixes
libarchive building on FreeBSD 4.
Robert Watson [Sat, 14 Jun 2008 15:17:02 +0000 (15:17 +0000)]
When NETATALK is compiled into the kernel, at_rmx.c is required regardless
of whether NETATALKDEBUG is enabled, so make building it conditional on
NETATALK instead. This problem appears to have been present from the time
that the netatalk implementation was imported.
PR: 124456
Submitted by: Nathan Whitehorn <whitehorn at wisc dot edu>
MFC after: 3 days
Ed Schouten [Sat, 14 Jun 2008 10:42:18 +0000 (10:42 +0000)]
Turn sgtty into a binary-only compatibility interface.
sgtty was the original interface to configure terminal attributes on my
UNIX-like operating systems. It has been deprecated by the POSIX termios
interface, which is implemented in almost any modern system.
An advantage of turning this into a binary compatibility interface, is
that we can now eventually remove the COMPAT_43TTY switch from kernel
configurations. This removes many ioctl()'s from the TTY layer.
While there, increase the __FreeBSD_version, which may be useful for the
people working on the Ports tree.
Randall Stewart [Sat, 14 Jun 2008 07:58:05 +0000 (07:58 +0000)]
- Macro-izes the packed declaration in all headers.
- Vimage prep - these are major restructures to move
all global variables to be accessed via a macro or two.
The variables all go into a single structure.
- Asconf address addition tweaks (add_or_del Interfaces)
- Fix rwnd calcualtion to be more conservative.
- Support SACK_IMMEDIATE flag to skip delayed sack
by demand of peer.
- Comment updates in the sack mapping calculations
- Invarients panic added.
- Pre-support for UDP tunneling (we can do this on
MAC but will need added support from UDP to
get a "pipe" of UDP packets in.
- clear trace buffer sysctl added when local tracing on.
Note the majority of this huge patch is all the vimage prep stuff :-)
Robert Watson [Fri, 13 Jun 2008 22:14:15 +0000 (22:14 +0000)]
The TrustedBSD MAC Framework named struct ipq instances 'ipq', which is the
same as the global variable defined in ip_input.c. Instead, adopt the name
'q' as found in about 1/2 of uses in ip_input.c, preventing a collision on
the name. This is non-harmful, but means that search and replace on the
global works less well (as in the virtualization work), as well as indexing
tools.
Add "fast" versions of macros and functions to taskqueue(9) API
description: TASKQUEUE_FAST_DEFINE(9), TASKQUEUE_FAST_DEFINE_THREAD(9),
taskqueue_create_fast(9). They deal with taskqueues intended for use
in fast interrupt handlers.
Alan Cox [Fri, 13 Jun 2008 19:33:56 +0000 (19:33 +0000)]
Tweak the promotion test in pmap_promote_pde(). Specifically, test PG_A
before PG_M. This sometimes prevents unnecessary removal of write access
from a PTE. Overall, the net result is fewer demotions and promotion
failures.
John Baldwin [Fri, 13 Jun 2008 12:14:22 +0000 (12:14 +0000)]
Make ex(4) MPSAFE:
- Add a mutex to the softc to protect the softc and device hardware.
- Use a private watchdog timer.
- Setup interrupt handler after ether_ifattach().
- Use bus_foo() rather than bus_space_foo() and remove bus space tag and
handle from softc.
Benno Rice [Fri, 13 Jun 2008 00:48:09 +0000 (00:48 +0000)]
Use callout_init_mtx to simplify locking somewhat. While we're here, rearrange
some operations in smc_detach to remove the need for the smc_shutdown variable.
Marcel Moolenaar [Fri, 13 Jun 2008 00:04:10 +0000 (00:04 +0000)]
Implement the -l and -r options for gpart show.
The -l option changes the output to show the partition label, if applicable
and when present. The -r option changes the output to show the raw (i.e.
scheme-specific) partition types.
Florent Thoumie [Thu, 12 Jun 2008 15:21:13 +0000 (15:21 +0000)]
- add: Keep dependent packages too if -K is specified.
- updating: terminating '\n' is not part of the package origin.
- bump PKG_INSTALL_VERSION to 20080612.
Ed Schouten [Thu, 12 Jun 2008 10:15:14 +0000 (10:15 +0000)]
Fix build of fstat after minor() changes.
Even though I ran a `make universe' to see whether the changes to the
device minor number macro's broke the build, I was not expecting `make
universe' to silently continue if build errors occured, thus causing me
to overlook the build error.