19 years agoPass more information down to the protocol-specific socket dispatch function
Jeffrey Hsu [Fri, 23 Apr 2004 10:21:08 +0000 (10:21 +0000)]
Pass more information down to the protocol-specific socket dispatch function
to use if desired.

19 years agomsync(..., MS_INVALIDATE) will incorrectly remove dirty pages without
Matthew Dillon [Fri, 23 Apr 2004 06:23:46 +0000 (06:23 +0000)]
msync(..., MS_INVALIDATE) will incorrectly remove dirty pages without
synchronizing them to their backing store under certain circumstances,
and can also cause struct buf's to become inconsistent.  This can be
particularly gruesome when MS_INVALIDATE is used on a range of memory that
is mmap()'d to be read-only.

Fix MS_INVALIDATE's operation (1) by making UFS honor the invalidation
request when flushing to backing store to destroy the related struct buf
and (2) by never removing pages wired into the buffer cache and never
removing pages that are found to still be dirty.

Note that NFS was already coded to honor invalidation requests in
nfs_write().  Filesystems other then NFS and UFS do not currently support
buffer-invalidation-on-write but all that means now is that the pages
will remain in cache, rather then be incorrectly removed and cause corruption.

Reported-by: Stephan Uphoff <ups@tree.com>, Julian Elischer <julian@elischer.org>
19 years agobuildiso was assuming a native obj hierarchy when running the make distribute
Matthew Dillon [Fri, 23 Apr 2004 02:14:07 +0000 (02:14 +0000)]
buildiso was assuming a native obj hierarchy when running the make distribute
for etc, but buildworld's obj hierarchy is in a buildworld-special place, so
this was creating a failure.

Give nrelease its own custom hierarchy for any manual make distribute's that
it decides to issue (of which there is exactly one right now: etc for
sendmail's CF generation).

19 years agoRevamp UPDATING with separate instructions for upgrading from sources
Matthew Dillon [Thu, 22 Apr 2004 23:24:19 +0000 (23:24 +0000)]
Revamp UPDATING with separate instructions for upgrading from sources
on a FreeBSD platform, installing fresh from the CD, and installing/upgrading
from sources on an existing DragonFly platform.

19 years agoStyle(9) cleanup.
Chris Pressey [Thu, 22 Apr 2004 18:33:52 +0000 (18:33 +0000)]
Style(9) cleanup.

- Remove `register' keywords.
- Remove casts to void when ignoring return values.
- No space after sizeof.
- *argv[] -> **argv
- No functional changes.

19 years agoStyle(9) cleanup to src/sys/vfs, stage 13/21: nwfs.
Chris Pressey [Thu, 22 Apr 2004 17:56:44 +0000 (17:56 +0000)]
Style(9) cleanup to src/sys/vfs, stage 13/21: nwfs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey
19 years agoposixlocks resource limit part 2/4: Add support to /usr/bin/limits.
Matthew Dillon [Thu, 22 Apr 2004 17:08:07 +0000 (17:08 +0000)]
posixlocks resource limit part 2/4: Add support to /usr/bin/limits.
This brings in Devon's:
lockfix-usr.bin.dfly.patch (which a number of formatting and
   backwards compatibility fixes added)

Submitted-by: "Devon H. O'Dell" <dodell@sitetronics.com>
19 years agoSplit the suggested invocation of fdisk (which is failing for some
Chris Pressey [Thu, 22 Apr 2004 16:53:17 +0000 (16:53 +0000)]
Split the suggested invocation of fdisk (which is failing for some
people) into two seperate invocations (which seems to work for them.)

The real solution would be to find out why fdisk -IB is troublesome,
but in the interim, this should save some frustration.

Problem-experienced-by: geekgod.com, Devon H. O'Dell, Dave Leimbach
Workaround-stumbled-upon-by: cpressey
19 years agoposixlocks resource limit part 1/4: Add support to the login.conf database,
Matthew Dillon [Thu, 22 Apr 2004 16:52:55 +0000 (16:52 +0000)]
posixlocks resource limit part 1/4: Add support to the login.conf database,
sh, and csh, and update manual pages.

This brings in Devon's:

lockfix-bin.dfly.patch (with minor nextopt() bug fixed)
lockfix-lib.dfly.patch (w/ #ifdef added around RLIMIT_POSIXLOCKS)

Submitted-by: "Devon H. O'Dell" <dodell@sitetronics.com>
19 years agoMore M_NOWAIT -> M_INTWAIT | M_NULLOK conversions, primarily atm and ipsec.
Matthew Dillon [Thu, 22 Apr 2004 05:09:51 +0000 (05:09 +0000)]
More M_NOWAIT -> M_INTWAIT | M_NULLOK conversions, primarily atm and ipsec.
NOTE: the atm code uses malloc(M_DEVBUF, ..).  It should probably have its
own malloc domain.

19 years agoCorrect type-o in last commit. oops.
Matthew Dillon [Thu, 22 Apr 2004 04:37:07 +0000 (04:37 +0000)]
Correct type-o in last commit.  oops.

19 years agoM_NOWAIT to mostly M_INTWAIT conversions, with a splattering of
Matthew Dillon [Thu, 22 Apr 2004 04:35:45 +0000 (04:35 +0000)]
M_NOWAIT to mostly M_INTWAIT conversions, with a splattering of
M_NULLOK to prevent exhaustion attacks from crashing the system.

Note in patricular that the MALLOC tseg_qent for the tcp reassembly
queue went from M_NOWAIT to M_INTWAIT | M_NULLOK.

19 years agoThe temporary message allocated to execute a connect request is not
Matthew Dillon [Thu, 22 Apr 2004 04:31:27 +0000 (04:31 +0000)]
The temporary message allocated to execute a connect request is not
optional (M_NOWAIT -> M_INTWAIT).

19 years agoUse M_INTWAIT instead of M_NOWAIT in the ip messaging redispatch case to
Matthew Dillon [Thu, 22 Apr 2004 04:26:28 +0000 (04:26 +0000)]
Use M_INTWAIT instead of M_NOWAIT in the ip messaging redispatch case to
avoid random drops.

19 years agoM_NOWAIT -> M_WAITOK or M_INTWAIT conversions. There is a whole lot of net
Matthew Dillon [Thu, 22 Apr 2004 04:22:06 +0000 (04:22 +0000)]
M_NOWAIT -> M_WAITOK or M_INTWAIT conversions.  There is a whole lot of net
code that is improperly using M_NOWAIT.  Also remove now unneeded NULL checks
since malloc will panic rather then return NULL when M_NULLOK is not set.

Use M_INTWAIT|M_NULLOK in some cases (such as route table allocation) in
order to allow malloc to return NULL when the limit for the malloc type
is reached.

19 years agoFix a race in user_ldt_free() against an interrupt (which attempts to
Matthew Dillon [Thu, 22 Apr 2004 03:39:43 +0000 (03:39 +0000)]
Fix a race in user_ldt_free() against an interrupt (which attempts to
save and restore the ldt) while it is being freed.  Reorder the free and use
a critical section to prevent the race.

Reported-by: Andrew Atrens <atrens@nortelnetworks.com>
19 years agoStyle(9) cleanup.
Chris Pressey [Wed, 21 Apr 2004 21:29:55 +0000 (21:29 +0000)]
Style(9) cleanup.

- Remove `register' keyword.
- Remove casts to void when ignoring return values.
- No functional changes.

19 years agoFix a netmsg memory leak in the ARP code. Adjust all ms_cmd function
Matthew Dillon [Wed, 21 Apr 2004 18:14:04 +0000 (18:14 +0000)]
Fix a netmsg memory leak in the ARP code.  Adjust all ms_cmd function
dispatches to return a proper error code.

Reported-by: multiple people
19 years agoFix symlink ordering issue with the less man page.
David Rhodus [Wed, 21 Apr 2004 16:59:51 +0000 (16:59 +0000)]
Fix symlink ordering issue with the less man page.
This was causing the quickworld process or error out.

Reported by: walt

19 years agoStyle(9) cleanup to src/sys/vfs, stage 12/21: nullfs.
Chris Pressey [Wed, 21 Apr 2004 16:55:09 +0000 (16:55 +0000)]
Style(9) cleanup to src/sys/vfs, stage 12/21: nullfs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey
19 years agoAdded short descriptions for kern.acct_suspend, kern.acct_resume, and
Justin C. Sherrill [Wed, 21 Apr 2004 15:39:02 +0000 (15:39 +0000)]
Added short descriptions for kern.acct_suspend, kern.acct_resume, and
kern.acct_chkfreq, for use with sysctl -d.

Suggested-by/Corrections-from: Chris Pressey

19 years agoFollowup commit, redo the way the root file descriptor slop is calculated
Matthew Dillon [Wed, 21 Apr 2004 06:09:53 +0000 (06:09 +0000)]
Followup commit, redo the way the root file descriptor slop is calculated
to avoid doing a divison in falloc(), and reorder the conditional to avoid
evaluating the more complex predicate most of the time.

19 years agoAdd a KKASSERT to mount(2) to make sure we have a proc pointer.
Hiten Pandya [Wed, 21 Apr 2004 04:49:00 +0000 (04:49 +0000)]
Add a KKASSERT to mount(2) to make sure we have a proc pointer.

19 years agoMerge: FreeBSD (RELENG_4) vfs_syscalls.c rev.
Hiten Pandya [Wed, 21 Apr 2004 04:47:28 +0000 (04:47 +0000)]
Merge: FreeBSD (RELENG_4) vfs_syscalls.c rev.

* Prohibit mount/umount operations inside a jail.

* Respect vfs.usermount sysctl for umount(2).

19 years agoMerge: FreeBSD (RELENG_4) kern_event.c rev.
Hiten Pandya [Wed, 21 Apr 2004 04:32:29 +0000 (04:32 +0000)]
Merge: FreeBSD (RELENG_4) kern_event.c rev.

Finish initializing a knote before we pass it to a callout.  This had
resulted in panics if large numbers of events were created with short

Reference: PR kern/64121 from FreeBSD GNATS repository.

19 years agoMerge: FreeBSD (RELENG_4) msdosfs_vfsops.c rev.
Hiten Pandya [Wed, 21 Apr 2004 04:28:00 +0000 (04:28 +0000)]
Merge: FreeBSD (RELENG_4) msdosfs_vfsops.c rev.

    Don't reject FAT file systems with a number of "Heads" greater than
    255; USB keychains exist that use 256 as the number of heads.

19 years agoMerge: FreeBSD (RELENG_4) kern_descrip.c rev.
Hiten Pandya [Wed, 21 Apr 2004 04:17:58 +0000 (04:17 +0000)]
Merge: FreeBSD (RELENG_4) kern_descrip.c rev.

* Update $FreeBSD$ CVS tag to indicate this and previous merges.

* Reserve the last 5% of file descriptors for root use.  This
  should allow systems to fail more gracefully when exhaustion
  occurs; report exhaustion has a rate-limited message.
  (Revision 1.201 - 1.203 of sys/kern_descrip.c from FreeBSD)

19 years agoMerge: FreeBSD (RELENG_4) aac_pci.c rev.
Hiten Pandya [Wed, 21 Apr 2004 03:28:07 +0000 (03:28 +0000)]
Merge: FreeBSD (RELENG_4) aac_pci.c rev.

Remove erroneous PCI Id.

19 years agoRemove two unused GEOM function prototypes. They were hangovers from
Chris Pressey [Wed, 21 Apr 2004 02:32:41 +0000 (02:32 +0000)]
Remove two unused GEOM function prototypes.  They were hangovers from
the boot code sync from FreeBSD-5.x.

19 years agoClean up typos and punctuation in comment.
Chris Pressey [Wed, 21 Apr 2004 02:17:13 +0000 (02:17 +0000)]
Clean up typos and punctuation in comment.

19 years agoFix an symlink ordering issue that was causing the install
David Rhodus [Tue, 20 Apr 2004 22:00:47 +0000 (22:00 +0000)]
Fix an symlink ordering issue that was causing the install
of the new less program to fail.

Pointed out by: JXrg Anslik

19 years agoNew logo of the DragonFly logo instead of the BSD Beastie. The old
Justin C. Sherrill [Tue, 20 Apr 2004 20:33:27 +0000 (20:33 +0000)]
New logo of the DragonFly logo instead of the BSD Beastie.  The old
version has been moved to src/sys/dev/misc/syscons/bsdlogo/ .

Idea from/Art converted by: Matt Emmerton <memmerto@yahoo.com>
Repo-copy help from: Matt Dillon <dillon@backplane.com>

19 years agoStyle(9) cleanup to src/sys/vfs, stage 11/21: ntfs.
Chris Pressey [Tue, 20 Apr 2004 19:59:30 +0000 (19:59 +0000)]
Style(9) cleanup to src/sys/vfs, stage 11/21: ntfs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey
19 years agoUpdate less to version 381.
Eirik Nygaard [Tue, 20 Apr 2004 17:43:33 +0000 (17:43 +0000)]
Update less to version 381.

19 years agoMerge from vendor branch LESS:
Eirik Nygaard [Tue, 20 Apr 2004 17:34:50 +0000 (17:34 +0000)]
Merge from vendor branch LESS:
Import of less 381

19 years agoImport of less 381
Eirik Nygaard [Tue, 20 Apr 2004 17:34:50 +0000 (17:34 +0000)]
Import of less 381

19 years agoWhen an mpipe was being destroyed, each element in the array was being
Matthew Dillon [Tue, 20 Apr 2004 16:58:32 +0000 (16:58 +0000)]
When an mpipe was being destroyed, each element in the array was being
freed, but the array itself was not.  Free the array as well.

Also do some minor tidying up of mpipe_done().

Reported-by: Craig Dooley <craig@xlnx-x.net>
19 years agom_tag_alloc illegally passed the mbuf flags to malloc, hitting the
Joerg Sonnenberger [Tue, 20 Apr 2004 07:35:22 +0000 (07:35 +0000)]
m_tag_alloc illegally passed the mbuf flags to malloc, hitting the
diagnostic panic there. Do the same as the other mbuf allocation
routines and check for M_WAIT explicitly.

Reported-by: Richard Nyberg <rnyberg@it.su.se>
19 years agoRevamp the initial lwkt_abortmsg() support to normalize the abstraction. Now
Matthew Dillon [Tue, 20 Apr 2004 01:52:28 +0000 (01:52 +0000)]
Revamp the initial lwkt_abortmsg() support to normalize the abstraction.  Now
a message's primary command is always processed by the target even if an
abort is requested before the target has retrieved the message from the
message port.  The message will then be requeued and the abort command copied
into lwkt_msg_t->ms_cmd.  Thus the target is always guarenteed to see the
original message and then a second, abort message (the same message with
ms_cmd = ms_abort) regardless of whether the abort was requested before
or after the target retrieved the original message.

ms_cmd is now an opaque union.  LWKT makes no assumptions as to its contents.
The NET code now stores nm_handler in ms_cmd as a function vector, and
nm_handler has been removed from all netmsg structures.

The ms_cmd function vector support nominally returns an integer error code
which is intended to support synchronous/asynchronous optimizations in the
future (to bypass messaging queueing and dequeueing in those situations
where they can be bypassed, without messing up the messaging abstraction).

The connect() predicate for which signal/abort support was added in the last
commit now uses the new abort mechanism.  Instead of having the handler
function check whether a message represents an abort or not, a different
handler vector is stored in ms_abort and run when an abort is processed
(making for an easy separation of function).

The large netmsg switch has been replaced by individual function vectors
using the new ms_cmd function vector support.  This will soon be removed
entirely in favor of direct assignment of LWKT-aware PRU vectors to the
messages command vector.

NOTE ADDITIONAL: eventually the SYSCALL, VFS, and DEV interfaces will use
the new message opaque ms_cmd 'function vector' support instead of a
command index.

Work by: Matthew Dillon and Jeffrey Hsu

19 years agoUse vm_page_hold() instead of vm_page_wire() for exec's mapping of the first
Matthew Dillon [Mon, 19 Apr 2004 20:07:16 +0000 (20:07 +0000)]
Use vm_page_hold() instead of vm_page_wire() for exec's mapping of the first
text page.  vm_page_hold() is cheaper.

Taken-From: Alan Cox / FreeBSD

19 years agoSync with FreeBSD 4-STABLE manpages.
Justin C. Sherrill [Mon, 19 Apr 2004 18:41:35 +0000 (18:41 +0000)]
Sync with FreeBSD 4-STABLE manpages.

Patches-from: Christian Brueffer <chris@unixpages.org

19 years agoFix code typo in previous commit to this file, thus allowing make(1)
Chris Pressey [Mon, 19 Apr 2004 17:44:53 +0000 (17:44 +0000)]
Fix code typo in previous commit to this file, thus allowing make(1)
to build without warnings when DEBUG_FLAGS=-Wall.

19 years agoStyle(9) cleanup to src/sys/vfs, stage 10/21: nfs.
Chris Pressey [Mon, 19 Apr 2004 16:33:49 +0000 (16:33 +0000)]
Style(9) cleanup to src/sys/vfs, stage 10/21: nfs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey
19 years agoIn contrast to FreeBSD 4 and 5, our slab allocator does hand out cross-page
Joerg Sonnenberger [Mon, 19 Apr 2004 13:37:43 +0000 (13:37 +0000)]
In contrast to FreeBSD 4 and 5, our slab allocator does hand out cross-page
allocations. This broke bus_dmamem_alloc, which depends on allocation of
size < PAGE_SIZE to not cross pages.

As a temporary workaround, bus_dmamem_alloc checks explicitly wether an
allocation crossed page boundaries and retries the allocation with size
rounded up to the next power-of-two.

19 years agoAllow an inp control block to be inserted on multiple wildcard hash tables.
Jeffrey Hsu [Sun, 18 Apr 2004 20:05:09 +0000 (20:05 +0000)]
Allow an inp control block to be inserted on multiple wildcard hash tables.

19 years agoCosmetic changes.
Jeffrey Hsu [Sun, 18 Apr 2004 06:41:35 +0000 (06:41 +0000)]
Cosmetic changes.

19 years agoDefine that Dragonfly HAS isblank() as to fix the
David Rhodus [Sun, 18 Apr 2004 00:15:35 +0000 (00:15 +0000)]
Define that Dragonfly HAS isblank() as to fix the
buildworld process. Before awk checked for isblank
not being defined.

19 years agoUpdate to awk 20040207.
Eirik Nygaard [Sat, 17 Apr 2004 19:42:15 +0000 (19:42 +0000)]
Update to awk 20040207.

19 years agoMerge from vendor branch AWK:
Eirik Nygaard [Sat, 17 Apr 2004 19:41:31 +0000 (19:41 +0000)]
Merge from vendor branch AWK:
Import of awk 20040207

19 years agoImport of awk 20040207
Eirik Nygaard [Sat, 17 Apr 2004 19:41:31 +0000 (19:41 +0000)]
Import of awk 20040207

19 years agoAdd in kernel config file options that were
David Rhodus [Sat, 17 Apr 2004 03:57:22 +0000 (03:57 +0000)]
Add in kernel config file options that were
forgotten on last commit.

19 years agonetisr_queue() needs to reliably allocate the message used to reference the
Matthew Dillon [Sat, 17 Apr 2004 00:46:28 +0000 (00:46 +0000)]
netisr_queue() needs to reliably allocate the message used to reference the
mbuf so make the allocation M_WAITOK instead of M_NOWAIT.  This also fixes
an mbuf leak due to some users of netisr_queue() not checking the return
value.  Note, however, that there were and still are issues with
netisr_queue() blocking (due to occassionally waiting on kernel_map,
possible deadlock issues, and so forth).

19 years agoStyle(9) cleanup to src/sys/vfs, stage 9/21: msdosfs.
Chris Pressey [Sat, 17 Apr 2004 00:30:17 +0000 (00:30 +0000)]
Style(9) cleanup to src/sys/vfs, stage 9/21: msdosfs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey
19 years agoChange WAIT_FOR_AUTO_NEG_DEFAULT to 0. Do not wait for auto-negotiation to
Matthew Dillon [Fri, 16 Apr 2004 23:18:14 +0000 (23:18 +0000)]
Change WAIT_FOR_AUTO_NEG_DEFAULT to 0.  Do not wait for auto-negotiation to
complete before continuing.  if_em can take over two seconds to autoneg, and it
renegotiates virtually every time the interface is manipulated.  For example,
running dhclient will cause if_em to renegotiate 3 times in a row.

Note that even when we were waiting for autoneg, the interface would not
always be completely up after the autoneg completed.  This is possibly
due to the watchdog timer (which is on a 2 second interval).  In fact, on
my test box this is what was tickling the recently fixed DNS bug (timing
out on part of the dns search path) and subsequent NFS mount failures.

19 years agoAdd in the twa(4) driver. This adds in support for the 3Ware
David Rhodus [Fri, 16 Apr 2004 20:13:17 +0000 (20:13 +0000)]
Add in the twa(4) driver. This adds in support for the 3Ware
Escalade 9000 series storage controllers. The driver is a
port of the work done by Vinod Kashyap in FreeBSD.

19 years agoPlace 'device acpica5' into the TINDERBOX kernel config so
David Rhodus [Fri, 16 Apr 2004 19:52:49 +0000 (19:52 +0000)]
Place 'device acpica5' into the TINDERBOX kernel config so
the tinderbox will build the new ACPI code and make sure the
complication remains working.

19 years agoAdd back in basic ACPI support into the LINT kernel build.
David Rhodus [Fri, 16 Apr 2004 19:49:09 +0000 (19:49 +0000)]
Add back in basic ACPI support into the LINT kernel build.
This option was lost during rev 1.24.

19 years agoMerge changes from FreeBSD 5:
Joerg Sonnenberger [Fri, 16 Apr 2004 15:40:21 +0000 (15:40 +0000)]
Merge changes from FreeBSD 5:
- remove dependency on device counting
- undo massive inlining on iavc

19 years agofor() ==> TAILQ_FOREACH
Joerg Sonnenberger [Fri, 16 Apr 2004 15:11:53 +0000 (15:11 +0000)]

19 years agoNuke unused fields in struct ifnet, if_done and if_poll_* hasn't been used
Joerg Sonnenberger [Fri, 16 Apr 2004 14:24:36 +0000 (14:24 +0000)]
Nuke unused fields in struct ifnet, if_done and if_poll_* hasn't been used
for years and ipending was only used for some flags not stored in if_flags.

19 years agoMove IFF_PROMISC and IFF_POLLING from ifnet.ipending to ifnet.if_flags,
Joerg Sonnenberger [Fri, 16 Apr 2004 14:21:58 +0000 (14:21 +0000)]
Move IFF_PROMISC and IFF_POLLING from ifnet.ipending to ifnet.if_flags,
where they belong. Consistently use the higher bits of if_flags, not ipending.

19 years agoUpdate tag creation paths to reflect the cvs
David Rhodus [Thu, 15 Apr 2004 21:00:50 +0000 (21:00 +0000)]
Update tag creation paths to reflect the cvs
layout since we have moved lots of things around.
This also stops the annoying errors when generating
tags and LINK files.

19 years agoKObj extension stage IIIb/III
Joerg Sonnenberger [Thu, 15 Apr 2004 13:31:41 +0000 (13:31 +0000)]
KObj extension stage IIIb/III

Merge inheritance support from FreeBSD:
  * Add a simpler form of 'inheritance' for devclasses. Each devclass can
    have a parent devclass. Searches for drivers continue up the chain of
    devclasses until either a matching driver is found or a devclass is
    reached which has no parent. This can allow, for instance, pci drivers
    to match cardbus devices (assuming that cardbus declares pci as its
    parent devclass).

19 years agoUse "mixer -s" for saving the mixer settings and adjust messages since we
Joerg Sonnenberger [Thu, 15 Apr 2004 12:59:29 +0000 (12:59 +0000)]
Use "mixer -s" for saving the mixer settings and adjust messages since we
are now storing/restore all mixer settings.

19 years agoFix output format of "mixer -s", it is supposed to be =rec rdev1 rdev2 ...
Joerg Sonnenberger [Thu, 15 Apr 2004 12:58:12 +0000 (12:58 +0000)]
Fix output format of "mixer -s", it is supposed to be =rec rdev1 rdev2 ...

19 years agoDo some style(9) cleanups and make add static.
Joerg Sonnenberger [Thu, 15 Apr 2004 12:50:07 +0000 (12:50 +0000)]
Do some style(9) cleanups and make add static.

19 years agoDon't print the recording sources to stderr, the manpage doesn't indicate
Joerg Sonnenberger [Thu, 15 Apr 2004 12:38:02 +0000 (12:38 +0000)]
Don't print the recording sources to stderr, the manpage doesn't indicate
this and it doesn't seem sensible.

Print the recording source in parameter format, if mixer is called with -s.

19 years agoMake a comment less misleading. rpcbind_enable (portmap) isn't
Chris Pressey [Thu, 15 Apr 2004 01:02:45 +0000 (01:02 +0000)]
Make a comment less misleading.  rpcbind_enable (portmap) isn't
required for NFS client operation, so don't imply that it is.

19 years agoStyle(9) cleanup to src/sys/vfs, stage 8/21: mfs.
Chris Pressey [Thu, 15 Apr 2004 00:59:41 +0000 (00:59 +0000)]
Style(9) cleanup to src/sys/vfs, stage 8/21: mfs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey
19 years agoDetect when the target process's thread is sitting on a message port and
Matthew Dillon [Thu, 15 Apr 2004 00:51:32 +0000 (00:51 +0000)]
Detect when the target process's thread is sitting on a message port and
schedule the thread in order to allow the message port handling code to
check for signals.

19 years agoImplement lwkt_abortmsg() support. This function chases down a message and
Matthew Dillon [Thu, 15 Apr 2004 00:50:05 +0000 (00:50 +0000)]
Implement lwkt_abortmsg() support.  This function chases down a message and
marks it MSGF_ABORTED, requeuing it to its target port for abort reprocessing.
The chasedown may run through multiple message forwardings and even chase the
message all the way back to the reply port (in which case the abort becomes a
NOP).  The queueing of a replied message is delayed if there is an abort
chasing it down until the abort chasedown has caught up to the message.

Support MSGF_PCATCH in the default waitport function.  If a signal is pending,
lwkt_default_waitport() (the default assigned to mp_waitport) will request
a message abort.  Note that we still have to wait for the message to be
returned after requesting a message abort.

Also do some minor performance tuning and adjust or move some of the inlines
from msgport2.h into lwkt_msgport.c.

19 years agoKObj extension stage IIIa/III
Joerg Sonnenberger [Wed, 14 Apr 2004 18:28:29 +0000 (18:28 +0000)]
KObj extension stage IIIa/III

Merge inheritance support from FreeBSD:
  * Add multiple inheritance to kobj. Each class can have zero or more base
    classes and if a method is not found in a given class, its base classes
    are searched (in the order they were declared). This search is recursive,
    i.e. a method may be define in a base class of a base class.

19 years agoRemove unit from sis_softc and use device_printf and if_printf instead of
Joerg Sonnenberger [Wed, 14 Apr 2004 18:24:34 +0000 (18:24 +0000)]
Remove unit from sis_softc and use device_printf and if_printf instead of
the "sis%d: ..." printfs. Use the device name for if_initname.

19 years agoRun the exec test for 5 seconds instead of 1 to improve measurement
Matthew Dillon [Wed, 14 Apr 2004 17:59:45 +0000 (17:59 +0000)]
Run the exec test for 5 seconds instead of 1 to improve measurement

19 years agouio_td might be NULL, do not indirect through uio_td to get to td_proc
Matthew Dillon [Wed, 14 Apr 2004 01:24:24 +0000 (01:24 +0000)]
uio_td might be NULL, do not indirect through uio_td to get to td_proc
unless it is non-NULL.  Note that td_proc in msdosfs_write() is used only
to check resource limits.  Resource limits will not be checked if p is
NULL (which is ok for now).

19 years agores_search only incremented got_servfail for h_errno == TRY_AGAIN *AND*
Matthew Dillon [Tue, 13 Apr 2004 21:53:43 +0000 (21:53 +0000)]
res_search only incremented got_servfail for h_errno == TRY_AGAIN *AND*
hp->rcode == SERVFAIL.  However, there are cases such as timeouts where
rcode is not always set to SERVFAIL.  This leads to inconsistent nameserver
operation during multi-domain and truncated dot searches, especially during
booting when portions of the network are being brought up simultanious with
dns lookups.

This patch attempts to correct the problem by unconditionally terminating
the search if TRY_AGAIN is returned (after res_query has gone through all
retries and name servers) instead of trying other domain elements in the
domain seach path.

This patch should fix reported problems (which I can reproduce) with some
NFS mounts failing during boot.  This occured because mount_nfs thought the
host name lookup returned a definitive failure using a non-dotted host name
when, in fact, it timed out on the first part (host.search.domain.name) and
got a definitive host-not-found response on the second part (host.).

Generally speaking, search path name server timeouts can exceed 60 seconds
per element and most machines which consistently timeout on earlier portions
of a search path are effectively non-operational due to the imposed delays.
It is more important for DNS lookups to return the proper error code then
to be able to recover a valid lookup in later portions of the search path
in these situations.

19 years agoUpdate diff, diff3 and sdiff to use diffutils 2.8.1
Eirik Nygaard [Tue, 13 Apr 2004 14:55:02 +0000 (14:55 +0000)]
Update diff, diff3 and sdiff to use diffutils 2.8.1

19 years agoRemove vim swap file, which should not have been imported.
Eirik Nygaard [Tue, 13 Apr 2004 14:25:13 +0000 (14:25 +0000)]
Remove vim swap file, which should not have been imported.

19 years agoMerge from vendor branch DIFFUTILS:
Eirik Nygaard [Tue, 13 Apr 2004 14:18:56 +0000 (14:18 +0000)]
Merge from vendor branch DIFFUTILS:
Import of diffutils 2.8.1

19 years agoImport of diffutils 2.8.1
Eirik Nygaard [Tue, 13 Apr 2004 14:18:56 +0000 (14:18 +0000)]
Import of diffutils 2.8.1

19 years agoFix a core dump caused by a .DEFAULT target with no commands.
Eirik Nygaard [Tue, 13 Apr 2004 13:49:00 +0000 (13:49 +0000)]
Fix a core dump caused by a .DEFAULT target with no commands.

Obtained from: NetBSD and FreeBSD

19 years agoDon't need opt_tcp_input.h for TCP_DISTRIBUTED_TCBINFO anymore.
Jeffrey Hsu [Tue, 13 Apr 2004 07:10:34 +0000 (07:10 +0000)]
Don't need opt_tcp_input.h for TCP_DISTRIBUTED_TCBINFO anymore.

19 years agoget rid of TCP_DISTRIBUTED_TCBINFO, it only added confusion.
Matthew Dillon [Tue, 13 Apr 2004 05:23:13 +0000 (05:23 +0000)]
get rid of TCP_DISTRIBUTED_TCBINFO, it only added confusion.

19 years agoCreate another entry point into ip_input() so MT_TAGs will work.
Jeffrey Hsu [Tue, 13 Apr 2004 00:14:01 +0000 (00:14 +0000)]
Create another entry point into ip_input() so MT_TAGs will work.

19 years agoStyle(9) cleanup to src/sys/vfs, stage 7/21: isofs.
Chris Pressey [Mon, 12 Apr 2004 23:18:55 +0000 (23:18 +0000)]
Style(9) cleanup to src/sys/vfs, stage 7/21: isofs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey
19 years agoThe malloc() call in at_fork() needs to use M_WAITOK instead of M_NOWAIT.
Matthew Dillon [Mon, 12 Apr 2004 17:49:27 +0000 (17:49 +0000)]
The malloc() call in at_fork() needs to use M_WAITOK instead of M_NOWAIT.
Note that at_fork() is not currently used by the system.

19 years agoANSIfication/style cleanups (non operational)
Matthew Dillon [Mon, 12 Apr 2004 17:47:39 +0000 (17:47 +0000)]
ANSIfication/style cleanups (non operational)

19 years agoRemove the now obsolete /usr/include/g++. Cleanup after the nawk->awk
Matthew Dillon [Mon, 12 Apr 2004 16:29:05 +0000 (16:29 +0000)]
Remove the now obsolete /usr/include/g++.  Cleanup after the nawk->awk
changes by removing the old nawk binary (it is now just 'awk'), and the
old gawk and nawk manual pages (it is now just 'man awk').

19 years agoRemove gawk from the build and let one-true-awk be our default awk from now
Eirik Nygaard [Mon, 12 Apr 2004 13:18:11 +0000 (13:18 +0000)]
Remove gawk from the build and let one-true-awk be our default awk from now
on. [1]

Let the bootstraping build one-true-awk and not gawk, and add maketab.nx to

Submitted by: ibotty <bsd@ibotty.net> [1]

19 years agoTell awk where the arguments for the program ends and where the arguments for
Eirik Nygaard [Mon, 12 Apr 2004 12:46:42 +0000 (12:46 +0000)]
Tell awk where the arguments for the program ends and where the arguments for
the awk script begins.

Written by: ibotty <me@ibotty.net> and myself.

19 years agoFix the conditional used to determine whether psignal() should be called.
Matthew Dillon [Mon, 12 Apr 2004 00:50:40 +0000 (00:50 +0000)]
Fix the conditional used to determine whether psignal() should be called.

Reported-by: Adam K Kirchhoff <adamk@voicenet.com>
19 years agoStyle(9) cleanup.
Chris Pressey [Sun, 11 Apr 2004 21:28:03 +0000 (21:28 +0000)]
Style(9) cleanup.

- Convert K&R-style function definitions to ANSI style.
- Remove `register' keywords.
- Use stdarg.h instead of varargs.h for variable numbers of arguments.
- #define _KERNEL_STRUCTURES when accessing kernel structures.
- No functional changes.

19 years agoStyle(9) cleanup to src/sys/vfs, stage 6/21: hpfs.
Chris Pressey [Sun, 11 Apr 2004 18:17:21 +0000 (18:17 +0000)]
Style(9) cleanup to src/sys/vfs, stage 6/21: hpfs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey
19 years agoSilence compiler warning by adding include files.
Jeffrey Hsu [Sun, 11 Apr 2004 07:41:52 +0000 (07:41 +0000)]
Silence compiler warning by adding include files.

19 years agoSilence warning about missing prototype.
Jeffrey Hsu [Sun, 11 Apr 2004 07:22:31 +0000 (07:22 +0000)]
Silence warning about missing prototype.

Reported by: Pete Carah <pete@altadena.net>

19 years agoFix compilation errors with missing header files and misnamed formal parameter.
Jeffrey Hsu [Sun, 11 Apr 2004 05:14:47 +0000 (05:14 +0000)]
Fix compilation errors with missing header files and misnamed formal parameter.

Reported by: David Rhodus

19 years agoUse the sf_buf facility rather then kmem_alloc_wait/pmap_kenter/kmem_free
Matthew Dillon [Sun, 11 Apr 2004 00:10:34 +0000 (00:10 +0000)]
Use the sf_buf facility rather then kmem_alloc_wait/pmap_kenter/kmem_free
to map the first page of a binary into memory during an exec.  This results
in 5-10% lower execl() overhead and approximately 2% lower sys time useage
in a buildworld (~15-20 second build time reduction on an AMD64/3200+),
with less code.  And its a nice cleanup as well.

Patch-by: Alan Cox <alc@cs.rice.edu>
19 years agoAdd vfork/exec perf test. exec1 tests static binaries, exec2 tests dynamic
Matthew Dillon [Sat, 10 Apr 2004 21:36:52 +0000 (21:36 +0000)]
Add vfork/exec perf test.  exec1 tests static binaries, exec2 tests dynamic
binaries (you can test resident dynamic binaries by 'resident /tmp/exec2'
and then running /tmp/exec2).

19 years agoDo some minor critical path performance improvements in the scheduler
Matthew Dillon [Sat, 10 Apr 2004 20:55:24 +0000 (20:55 +0000)]
Do some minor critical path performance improvements in the scheduler
and at the user/system boundary.  Avoid some unnecessary segment prefix ops,
remove some unnecessary memory ops by using more optimal critical
section inlines, and use 32 bit arithmatic instead of 64 bit arithmatic
when calculating system tick overheads in userret().

This saves a whopping 5ns worth of syscall overhead, which just proves
how silly I am sometimes.

19 years agoANSIfication and style cleanups. Non operational.
Matthew Dillon [Sat, 10 Apr 2004 18:15:37 +0000 (18:15 +0000)]
ANSIfication and style cleanups.  Non operational.