19 years agoFix prototype for signal handlers
Joerg Sonnenberger [Thu, 19 Aug 2004 23:26:12 +0000 (23:26 +0000)]
Fix prototype for signal handlers

19 years agoHide prototyp for loginit if ACULOG is false.
Joerg Sonnenberger [Thu, 19 Aug 2004 23:21:12 +0000 (23:21 +0000)]
Hide prototyp for loginit if ACULOG is false.

19 years agoFix spurious warning
Joerg Sonnenberger [Thu, 19 Aug 2004 23:12:10 +0000 (23:12 +0000)]
Fix spurious warning

19 years agosys/types.h ==> sys/param.h for ntohl
Joerg Sonnenberger [Thu, 19 Aug 2004 21:38:30 +0000 (21:38 +0000)]
sys/types.h ==> sys/param.h for ntohl

19 years ago- use WARNS?= 6 instead of a hard-wired list. -pedantic doesn't really work
Joerg Sonnenberger [Thu, 19 Aug 2004 21:36:46 +0000 (21:36 +0000)]
- use WARNS?= 6 instead of a hard-wired list. -pedantic doesn't really work
  anyway (no long long)
- use sys/param.h for nhtl in kgzcmp.c
- don't cast away const in kgzip.c, correct the usage of malloc'd space

19 years agoUse sys/param.h instead of sys/types.h for endian macros.
Joerg Sonnenberger [Thu, 19 Aug 2004 21:25:58 +0000 (21:25 +0000)]
Use sys/param.h instead of sys/types.h for endian macros.

This is in sync with the man page and results in a warning with the coming
endian patch.

19 years agoAdd implemenation of splay tree and red-black tree.
Joerg Sonnenberger [Thu, 19 Aug 2004 20:38:33 +0000 (20:38 +0000)]
Add implemenation of splay tree and red-black tree.

Obtained-from: NetBSD

19 years agoRemove the advertising clause where possible as per the directive from
Matthew Dillon [Thu, 19 Aug 2004 17:36:42 +0000 (17:36 +0000)]
Remove the advertising clause where possible as per the directive from
UC Berkeley (see /usr/src/COPYRIGHT) and with Ken Smith's permission
for mv.c.

>From:     Ken Smith <kensmith@cse.Buffalo.EDU>
>Subject:  mv.c license change
>To:       Matthew Dillon <dillon@apollo.backplane.com>
>Date:     Thu, 19 Aug 2004 13:30:28 -0400
>Yes, you have my permission to remove the advertising clause from
>the license agreement in /usr/src/bin/mv/mv.c.
>                                                Ken Smith
>- From there to here, from here to      |       kensmith@cse.buffalo.edu
>  there, funny things are everywhere.   |
>                      - Theodore Geisel |

19 years agoPlug in missing brelse calls as to fix a bug in the FFS reload code.
David Rhodus [Thu, 19 Aug 2004 14:42:46 +0000 (14:42 +0000)]
Plug in missing brelse calls as to fix a bug in the FFS reload code.

19 years agoUpdate to reflect DragonFly reality.
Jeroen Ruigrok/asmodai [Thu, 19 Aug 2004 09:36:47 +0000 (09:36 +0000)]
Update to reflect DragonFly reality.

19 years agoAdd the long overdue ehci(4) manual page.
Jeroen Ruigrok/asmodai [Thu, 19 Aug 2004 09:34:55 +0000 (09:34 +0000)]
Add the long overdue ehci(4) manual page.

Obtained from: NetBSD's v1.11

19 years agoAdd the vop_ops for ntfs before obtaining the root vnode(s) rather then
Matthew Dillon [Thu, 19 Aug 2004 00:30:07 +0000 (00:30 +0000)]
Add the vop_ops for ntfs before obtaining the root vnode(s) rather then

Reported-by: "David W. Chapman Jr." <dwcjr@inethouston.net>
19 years agoThe -D__FreeBSD__ must be -D__FreeBSD__=4 or sendmail will not be properly
Matthew Dillon [Wed, 18 Aug 2004 16:55:21 +0000 (16:55 +0000)]
The -D__FreeBSD__ must be -D__FreeBSD__=4 or sendmail will not be properly
configured to use features like setproctitle().

19 years agoMake the buildkernel and nativekernel targets completely wipe and regenerate
Matthew Dillon [Wed, 18 Aug 2004 16:37:15 +0000 (16:37 +0000)]
Make the buildkernel and nativekernel targets completely wipe and regenerate
the kernel object hierarchy.

Add a quickkernel target which does not wipe the object hieracrhy and which
skips the make depend step.  quickkernel can be run on kernels previously
built with buildkernel or nativekernel.

This brings the operation of our kernel building targets in-line with the
operation of our world building targets.

19 years agoProperly free the temporary sf_buf in uiomove_fromphys() if a copyin/copyout
Matthew Dillon [Wed, 18 Aug 2004 09:16:16 +0000 (09:16 +0000)]
Properly free the temporary sf_buf in uiomove_fromphys() if a copyin/copyout
fails.  Such failures commonly occur when pipes are broken by a ^C.

19 years ago[test format strings for cvs server config]
Matthew Dillon [Wed, 18 Aug 2004 09:10:32 +0000 (09:10 +0000)]
[test format strings for cvs server config]

19 years agotest
Matthew Dillon [Wed, 18 Aug 2004 09:07:06 +0000 (09:07 +0000)]

19 years ago*** empty log message ***
Matthew Dillon [Wed, 18 Aug 2004 09:04:29 +0000 (09:04 +0000)]
*** empty log message ***

19 years ago*** empty log message ***
Matthew Dillon [Wed, 18 Aug 2004 09:02:08 +0000 (09:02 +0000)]
*** empty log message ***

19 years agobleh
Matthew Dillon [Wed, 18 Aug 2004 08:56:53 +0000 (08:56 +0000)]

19 years ago*** empty log message ***
Matthew Dillon [Wed, 18 Aug 2004 08:47:16 +0000 (08:47 +0000)]
*** empty log message ***

19 years ago*** empty log message ***
Matthew Dillon [Wed, 18 Aug 2004 08:45:58 +0000 (08:45 +0000)]
*** empty log message ***

19 years agomore testing
Matthew Dillon [Wed, 18 Aug 2004 08:43:23 +0000 (08:43 +0000)]
more testing

19 years agoyet more testing
Matthew Dillon [Wed, 18 Aug 2004 08:31:50 +0000 (08:31 +0000)]
yet more testing

19 years agotest
Matthew Dillon [Wed, 18 Aug 2004 08:24:44 +0000 (08:24 +0000)]

19 years ago*** empty log message ***
Matthew Dillon [Wed, 18 Aug 2004 08:00:38 +0000 (08:00 +0000)]
*** empty log message ***

19 years agofeh2
Matthew Dillon [Wed, 18 Aug 2004 07:24:30 +0000 (07:24 +0000)]

19 years agofeh
Matthew Dillon [Wed, 18 Aug 2004 07:23:54 +0000 (07:23 +0000)]

19 years agosigh
Matthew Dillon [Wed, 18 Aug 2004 07:18:52 +0000 (07:18 +0000)]

19 years agomore testing 3
Matthew Dillon [Wed, 18 Aug 2004 07:00:25 +0000 (07:00 +0000)]
more testing 3

19 years agomore testing
Matthew Dillon [Wed, 18 Aug 2004 06:37:03 +0000 (06:37 +0000)]
more testing

19 years agoTest commits after machine upgrade.
Matthew Dillon [Wed, 18 Aug 2004 06:23:55 +0000 (06:23 +0000)]
Test commits after machine upgrade.

19 years agoAdd some robustness to the error-requeue code. FreeBSD-5's (new) ata driver
Matthew Dillon [Tue, 17 Aug 2004 20:59:39 +0000 (20:59 +0000)]
Add some robustness to the error-requeue code.  FreeBSD-5's (new) ata driver
had an issue with the donecount not being properly reset.  This issue is not
believed to occur with the old code but add sanity checks to be sure.

19 years agoProperly record and print 64 bit file sizes, do not truncate the file size
Matthew Dillon [Tue, 17 Aug 2004 20:34:38 +0000 (20:34 +0000)]
Properly record and print 64 bit file sizes, do not truncate the file size
to 32 bits.

19 years agoUpdate list of installer packages to match installer version 1.1.
Chris Pressey [Tue, 17 Aug 2004 19:23:52 +0000 (19:23 +0000)]
Update list of installer packages to match installer version 1.1.

19 years agoVFS messaging/interfacing work stage 2/99. This stage retools the vnode ops
Matthew Dillon [Tue, 17 Aug 2004 18:57:36 +0000 (18:57 +0000)]
VFS messaging/interfacing work stage 2/99.  This stage retools the vnode ops
vector dispatch, making the vop_ops a per-mount structure rather then a
per-filesystem structure.  Filesystem mount code, typically in blah_vfsops.c,
must now register various vop_ops pointers in the struct mount to compile
its VOP operations set.

This change will allow us to begin adding per-mount hooks to VFSes to support
things like kernel-level journaling, various forms of cache coherency
management, and so forth.

In addition, the vop_*() calls now require a struct vop_ops pointer as the
first argument instead of a vnode pointer (note: in this commit the VOP_*()
macros currently just pull the vop_ops pointer from the vnode in order to
call the vop_*() procedures).  This change is intended to allow us to divorce
ourselves from the requirement that a vnode pointer always be part of a VOP
call.  In particular, this will allow namespace based routines such as
remove(), mkdir(), stat(), and so forth to pass namecache pointers rather then
locked vnodes and is a very important precursor to the goal of using the
namecache for namespace locking.

19 years agoAdd an installer-fetchpkgs target and other related stuff to reduce the
Matthew Dillon [Tue, 17 Aug 2004 18:05:41 +0000 (18:05 +0000)]
Add an installer-fetchpkgs target and other related stuff to reduce the
work required to bring in the installer packages when building an
installer-enabled ISO.

Submitted-by: Chris Pressey <cpressey@catseye.mine.nu>
19 years agoMake this WARNS?=6 clean by explicitly using __DECONST for the write
Joerg Sonnenberger [Mon, 16 Aug 2004 14:19:31 +0000 (14:19 +0000)]
Make this WARNS?=6 clean by explicitly using __DECONST for the write
buffers in iov.

19 years agoIn cmd(), after the vsnprintf is a strcat done to append a newline.
Joerg Sonnenberger [Mon, 16 Aug 2004 14:11:39 +0000 (14:11 +0000)]
In cmd(), after the vsnprintf is a strcat done to append a newline.
Keep that in mind for the size calculation.

19 years agoFix various buffer overflows.
Joerg Sonnenberger [Mon, 16 Aug 2004 14:07:34 +0000 (14:07 +0000)]
Fix various buffer overflows.

Noticed-by: Christer "Ober <christer.oberg@deprotect.com>
19 years agoMore constify.
Joerg Sonnenberger [Mon, 16 Aug 2004 13:51:21 +0000 (13:51 +0000)]
More constify.

19 years agoMake libftpio WARNS=6 clean.
Joerg Sonnenberger [Mon, 16 Aug 2004 12:59:21 +0000 (12:59 +0000)]
Make libftpio WARNS=6 clean.

19 years agoFix the fprintf statement for overlong domainnames.
Joerg Sonnenberger [Mon, 16 Aug 2004 05:55:13 +0000 (05:55 +0000)]
Fix the fprintf statement for overlong domainnames.

Noticed-by: dillon
19 years ago- use const for file names, static for local functions
Joerg Sonnenberger [Sun, 15 Aug 2004 17:05:06 +0000 (17:05 +0000)]
- use const for file names, static for local functions
- remove register keyword
- remove useless casts
- remove '?' case from getopt switch
- check return value of signal

Submitted-by: Liam J. Foy <liamfoy@sepulcrum.org>
- use sys/queue.h instead of hand-rolled simple list
- WARNS?= 6 clean

19 years agoMinor style changes.
Joerg Sonnenberger [Sun, 15 Aug 2004 16:12:03 +0000 (16:12 +0000)]
Minor style changes.

19 years agoAdd strotonum(3) into the !ANSI_SOURCE && !_POSIX_SOURCE && !__STRICT_ANSI
Joerg Sonnenberger [Sun, 15 Aug 2004 16:01:11 +0000 (16:01 +0000)]
Add strotonum(3) into the !ANSI_SOURCE && !_POSIX_SOURCE && !__STRICT_ANSI
part of stdlib.h.

strtonum simplifies string conversion by allowing automatic boundary checks.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Obtained-from: OpenBSD

19 years ago- WARNS ?= 6 clean
Joerg Sonnenberger [Sun, 15 Aug 2004 15:06:58 +0000 (15:06 +0000)]
- WARNS ?= 6 clean
- make helper functions static and the arguments const if possible
- remove '?' case from getopt switch
- remove useless casts to void of function return values
- move the error handling label to the end of the function, we don't want
  Italian code here

19 years agoMake the addr parameter to kernacc and useracc const.
Joerg Sonnenberger [Sun, 15 Aug 2004 15:00:22 +0000 (15:00 +0000)]
Make the addr parameter to kernacc and useracc const.

Wondered-about: corecode

19 years agoIOCTL mapping layer Part II/II
Joerg Sonnenberger [Sun, 15 Aug 2004 14:15:00 +0000 (14:15 +0000)]
IOCTL mapping layer Part II/II

Convert the Linux IOCTL emulation to use the new mapping layer. This
also changes the drm(4) and aac(4) emulation of the respective APIs.

Submitted-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
19 years ago- remove prototype for main
Joerg Sonnenberger [Sun, 15 Aug 2004 12:27:37 +0000 (12:27 +0000)]
- remove prototype for main
- make usage() static
- remove unnecessary casts of function returns
- explicitly check input length against MAXHOSTNAMELEN for setdomainname
- explicitly terminate string after getdomainname
- minor style cleanup, this is WARNS?= 6 clean.

19 years agoAdd a missing uio_td assignment (that unionfs needs).
Matthew Dillon [Sat, 14 Aug 2004 19:55:28 +0000 (19:55 +0000)]
Add a missing uio_td assignment (that unionfs needs).

Reported-by: David Rhodus <sdrhodus@gmail.com>
19 years agoAdd DFOSVERSION for ports to check for DragonFly and allow them to handle
Joerg Sonnenberger [Sat, 14 Aug 2004 13:49:41 +0000 (13:49 +0000)]
Add DFOSVERSION for ports to check for DragonFly and allow them to handle
it accordlingly.

Submitted-by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
19 years ago- remove '?' from getopt switch case
Joerg Sonnenberger [Sat, 14 Aug 2004 13:37:46 +0000 (13:37 +0000)]
- remove '?' from getopt switch case
- check the return values of gettimeofday and signal
- improve wording of failed fork() message

Submitted-by: Liam J. Foy <liamjoy@sepulcrum.org>
19 years agoMove a comment to the right place.
Jeffrey Hsu [Sat, 14 Aug 2004 06:41:33 +0000 (06:41 +0000)]
Move a comment to the right place.
Indentation changes.

19 years agoFix function definition {} placement according to our own style.
Jeroen Ruigrok/asmodai [Fri, 13 Aug 2004 19:12:52 +0000 (19:12 +0000)]
Fix function definition {} placement according to our own style.

Submitted by: Liam J. Foy <liamfoy@sepulcrum.org>

19 years agoRemove question mark (?) case statement.
Jeroen Ruigrok/asmodai [Fri, 13 Aug 2004 19:01:18 +0000 (19:01 +0000)]
Remove question mark (?) case statement.
Change %c strftime() specifier into %s to make sure we don't drop year

Submitted by: Liam J. Foy <liamfoy@sepulcrum.org>

19 years agoSplit off code in print_all_info() into print_batt_life(), print_batt_stat()
Jeroen Ruigrok/asmodai [Fri, 13 Aug 2004 18:58:55 +0000 (18:58 +0000)]
Split off code in print_all_info() into print_batt_life(), print_batt_stat()
and print_batt_time().
Add prototypes.

Vast majority submitted by: Liam J. Foy <liamfoy@sepulcrum.org>

19 years agoMake all the local functions static.
Jeroen Ruigrok/asmodai [Fri, 13 Aug 2004 18:48:29 +0000 (18:48 +0000)]
Make all the local functions static.

Partially submitted by: Liam J. Foy <liamfoy@sepulcrum.org>

19 years agoUse proper EXIT_FAILURE/EXIT_SUCCESS for exit() calls.
Jeroen Ruigrok/asmodai [Fri, 13 Aug 2004 18:44:11 +0000 (18:44 +0000)]
Use proper EXIT_FAILURE/EXIT_SUCCESS for exit() calls.

Submitted by: Liam J. Foy <liamfoy@sepulcrum.org>

19 years agoUse proper ANSI prototypes and make sure all arguments are supplied in the
Jeroen Ruigrok/asmodai [Fri, 13 Aug 2004 18:41:45 +0000 (18:41 +0000)]
Use proper ANSI prototypes and make sure all arguments are supplied in the
function definition.

Submitted partially by: Liam J. Foy <liamfoy@sepulcrum.org>

19 years agoVFS messaging/interfacing work stage 1/99. This stage replaces the old
Matthew Dillon [Fri, 13 Aug 2004 17:51:14 +0000 (17:51 +0000)]
VFS messaging/interfacing work stage 1/99.  This stage replaces the old
dynamic VFS descriptor and inlined wrapper mess with a fixed structure
and fixed procedural wrappers.  Most of the work is straightforward except
for vfs_init, which was basically rewritten (and greatly simplified).

It is my intention to make the vop_*() call wrappers eventually handle
range locking and cache coherency issues as well as implementing the
direct call -> messaging interface layer.  The call wrappers will also
API translation as we shift the APIs over to new, more powerful mechanisms
in order to allow the work to be incrementally committed.

This is the first stage of what is likely to be a huge number of stages
to modernize the VFS subsystem.

19 years agoRemove unused variable.
David Rhodus [Fri, 13 Aug 2004 14:27:29 +0000 (14:27 +0000)]
Remove unused variable.

19 years agoIOCTL mapping layer Part I/II
Joerg Sonnenberger [Fri, 13 Aug 2004 11:59:00 +0000 (11:59 +0000)]
IOCTL mapping layer Part I/II

This adds a generic framework for mapping IOCTL requests (cmds) and
attaching special processing functions. Instead of the former adhoc
code using large switch statements e.g. in emulation/linux/linux_ioctl.c,
the emulation layer registers a handler with the mappings for the request
ranges it wants to handle specially. Devices can afterwards add there
own mappings to support e.g. Linux specific IOCTLs.

The first part adds the infrastructure, the second part converts the Linux
emulation, dev/drm and dev/raid/aac.

Submitted-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Some minor changes by myself.

19 years agoAdd proper prototypes for dump_packet() and pr_type().
Jeroen Ruigrok/asmodai [Fri, 13 Aug 2004 10:41:23 +0000 (10:41 +0000)]
Add proper prototypes for dump_packet() and pr_type().

19 years agoAdd the latest source versions of OpenBSD's traceroute program (which came
Jeroen Ruigrok/asmodai [Fri, 13 Aug 2004 10:39:22 +0000 (10:39 +0000)]
Add the latest source versions of OpenBSD's traceroute program (which came
from NetBSD, which came from Berkeley and was contributed by Van Jacobsen).

19 years agoAdd MODULE_VERSION(pci, 1), e.g. agp(4) can't be loaded as module otherwise.
Joerg Sonnenberger [Fri, 13 Aug 2004 08:27:02 +0000 (08:27 +0000)]
Add MODULE_VERSION(pci, 1), e.g. agp(4) can't be loaded as module otherwise.

Suggested-by: corecode
While at it, de-static pci_alloc_resource to match the prototyp. ACPI5
depends on it.

19 years agoHave make upgrade remove two stale 80211 header files that can mess
Matthew Dillon [Fri, 13 Aug 2004 05:30:02 +0000 (05:30 +0000)]
Have make upgrade remove two stale 80211 header files that can mess
up the /usr/src/usr.bin/truss build (primarily due to the way the ioctl
code just collects all the header files in existance).

19 years agoOops, undo portions of the last commit, some extra work got committed that
Matthew Dillon [Fri, 13 Aug 2004 02:59:29 +0000 (02:59 +0000)]
Oops, undo portions of the last commit, some extra work got committed that
isn't quite ready to go in yet.

19 years agoClose a kernel mem disclosure bug in linprocfs. The uio_offset was not
Matthew Dillon [Fri, 13 Aug 2004 02:50:58 +0000 (02:50 +0000)]
Close a kernel mem disclosure bug in linprocfs.  The uio_offset was not
being properly bounded.  Use uiomove_frombuf() instead of trying to
calculate it manually.

Submitted-by: =?ISO-8859-1?Q?Christer_=D6berg?= <christer.oberg@deprotect.com>
19 years agoThe base/count bounds checking was insufficient, leading to a kernel memory
Matthew Dillon [Fri, 13 Aug 2004 02:45:37 +0000 (02:45 +0000)]
The base/count bounds checking was insufficient, leading to a kernel memory
visibility hole.

Note: additional cast to unsigned to catch signed overflows added by Matt Dillon
Submitted-by: =?ISO-8859-1?Q?Christer_=D6berg?= <christer.oberg@deprotect.com>
19 years agoadd 'read1', a program that tests reading one byte at a time from a file.
Matthew Dillon [Fri, 13 Aug 2004 02:28:42 +0000 (02:28 +0000)]
add 'read1', a program that tests reading one byte at a time from a file.

19 years agoAdd message passed syscall's.
Eirik Nygaard [Thu, 12 Aug 2004 19:59:31 +0000 (19:59 +0000)]
Add message passed syscall's.

Split up sendsys2() into two parts, sendsys2() and waitsys2(). sendsys2() will
take care of the synchronous syscall's and initate asynchronous syscall's, and
waitsys2() will wait for a asynchronous syscall to finish.

Asynchronous syscall's can currently only be issued by the root user, but this
limitation will be removed when the code becomes more stable and better tested.

Add userland support for the synchronous and asynchronous sysmsg's to libcr.
Libcr defaults to the use of synchronous sysmsg's now, but this will be changes
as soon as we allow every user to do asynchronous sysmsg's.

Add a limitation to the number of sysmsg's one proc can have running at any
given time. This defaults to unlimited and can be changed with the
kern.max_sysmsg sysctl.

19 years agoAdd a description for LIST_FOREACH_MUTABLE and TAILQ_FOREACH_MUTABLE.
Joerg Sonnenberger [Thu, 12 Aug 2004 15:07:42 +0000 (15:07 +0000)]

19 years agoAdd LIST_FOREACH_MUTABLE which works like TAILQ_FOREACH_MUTABLE.
Joerg Sonnenberger [Thu, 12 Aug 2004 14:57:29 +0000 (14:57 +0000)]

19 years agoGet rid of the NO_TCSH make.conf variable. We do not support removing
Matthew Dillon [Thu, 12 Aug 2004 08:08:08 +0000 (08:08 +0000)]
Get rid of the NO_TCSH make.conf variable.   We do not support removing
/bin/csh from the base system as part of a buildworld sequence.

19 years agoThe EISA attachment of vx does have a softc, export it's size correctly.
Joerg Sonnenberger [Thu, 12 Aug 2004 06:42:59 +0000 (06:42 +0000)]
The EISA attachment of vx does have a softc, export it's size correctly.

Obtained-from: FreeBSD

19 years agoTest CVS commit.
Gregory Neil Shapiro [Thu, 12 Aug 2004 05:04:48 +0000 (05:04 +0000)]
Test CVS commit.

19 years agoAdd a state to sanity check tcp_close() to make sure it is not called
Matthew Dillon [Wed, 11 Aug 2004 02:36:22 +0000 (02:36 +0000)]
Add a state to sanity check tcp_close() to make sure it is not called

Add a 'cpu' field to the inpcb so the cpu owning a pcb can be made
well-known, for use in later assertions as we move closer to removing
the BGL.

Fix a bug in the closing of listen sockets.  The inp wildcard hash table
removal was being done asynchronously with the freeing of the inp, which
could lead to problems.  Instead of sending messages in parallel to all tcp
protocol threads to remove the wildcard hash we instead chain a single
message through all tcp protocol threads to remove the hash, then detach the
inp at the end of the chain.

There is still an issue with the socket being ripped out from under other
protocol threads which might be trying to accept connections on behalf of
the listen socket which must be resolved before the BGL can be removed (amoung
other things).

19 years agoDiscard accepted and pending connections after we detach the listen socket
Matthew Dillon [Wed, 11 Aug 2004 02:24:16 +0000 (02:24 +0000)]
Discard accepted and pending connections after we detach the listen socket
rather then before in order to be sure to catch any connections that occur
while we are attempting to detach the listen socket.

19 years agoPPP stupidly hardwires some flag constants that it 'steals' from the mbuf
Matthew Dillon [Tue, 10 Aug 2004 22:05:30 +0000 (22:05 +0000)]
PPP stupidly hardwires some flag constants that it 'steals' from the mbuf
structure.  We are now using the flag bits it stole, which resulted in
packets being dropped and other issues.

Having ppp use M_PROTOx flags rather then hardwired constants fixes the

Reported-by: Sarunas Vancevicius <vsarunas@eircom.net>
19 years agoFix gcc 3.4 build.
Eirik Nygaard [Tue, 10 Aug 2004 16:03:12 +0000 (16:03 +0000)]
Fix gcc 3.4 build.

Reported by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>

19 years agoYet another hack for x11/xorg-clients.
Joerg Sonnenberger [Tue, 10 Aug 2004 10:58:37 +0000 (10:58 +0000)]
Yet another hack for x11/xorg-clients.

19 years agoRemoved freebsd.mc line, added ports/arabic line as found in the FreeBSD
Justin C. Sherrill [Mon, 9 Aug 2004 20:55:19 +0000 (20:55 +0000)]
Removed freebsd.mc line, added ports/arabic line as found in the FreeBSD
version of refuse.  Synced refuse.README with FreeBSD version too.

Suggested by: Adrian Nida <nida@musc.edu>

19 years agoBring in FreeBSD mount.c/1.58, original commit message:
Matthew Dillon [Mon, 9 Aug 2004 20:15:23 +0000 (20:15 +0000)]
Bring in FreeBSD mount.c/1.58, original commit message:
 date: 2004/01/07 05:37:56;  author: anholt;  state: Exp;  lines: +1 -1
 Allow trailing slashes for MNT_UPDATE case (mount -u), too.

 PR:             bin/59144
 Submitted by:   Stefan Farfeleder <stefan@fafoe.narf.at>

Suggested-by: Barry Bouwsma
19 years agoSynchronize syslogd with FreeBSD. Primarily syslogd.c/1.129. This primarily
Matthew Dillon [Mon, 9 Aug 2004 20:11:19 +0000 (20:11 +0000)]
Synchronize syslogd with FreeBSD.  Primarily syslogd.c/1.129.  This primarily
adds code to avoid fsync()ing the log file line-by-line when further input
from the pipe is pending.

The FreeBSD commit message for 1.129:
 date: 2004/07/04 19:13:58;  author: cperciva;  state: Exp;  lines: +25 -3
 Where syslogd would have fsync()ed a file in the past, instead set a flag
 FFLAG_NEEDSYNC and fsync the file when select() next returns zero.  This
 dramatically speeds up the process of logging large amounts of data, while
 leaving the essential semantics (that data can be expected to be on disk
 if we crash) unchanged.

 In my tests, this speeds up the rc phase of booting by 18-20%. [1]

Suggested-by: Barry Bouwsma
Source: FreeBSD

19 years agoMerge FreeBSD ip.c/1.101, commit message:
Matthew Dillon [Mon, 9 Aug 2004 19:54:36 +0000 (19:54 +0000)]
Merge FreeBSD ip.c/1.101, commit message:

Make getprotobynumber() calls in FilterCheck conditional on the log
levels by which they are used.  On a typical production setting (no
debug or filter logging) this will save an open/read/close system
call sequence per packet, approximately halving the system overhead
and reducing the overall overhead by 38%.

Suggested-by: Barry Bouwsma
19 years agoThe SF64-PCR card has no sound support but stupidly uses the same PCI id
Matthew Dillon [Mon, 9 Aug 2004 19:49:28 +0000 (19:49 +0000)]
The SF64-PCR card has no sound support but stupidly uses the same PCI id
as other cards.  The hack that was supposed to detect the lack of sound
support does not work, causing a number of other cards to improperly probe
as not having sound support.  so disable it for the moment.  People who
actually have this card will have to set I_HAVE_SF64_PCR in their

Source: Barry Bouwsma

19 years agoffs_dirpref() calculates dirsize = (fs->fs_avgfilesize * fs->fs_avgfpdir).
Matthew Dillon [Mon, 9 Aug 2004 19:41:04 +0000 (19:41 +0000)]
ffs_dirpref() calculates dirsize = (fs->fs_avgfilesize * fs->fs_avgfpdir).
However, these two paramters can be set by the sysop such that they easily
overflow a 32 bit integer.  Use 64 bit arithmatic to prevent the overflow
and special-case values > 0x7fffffff to simply set maxcontigdirs to 1 rather
then waste time doing further 64 bit arithmatic.

Note that NetBSD also changed 'cgsize' to a 64 bit integer, but fails to
properly cast at least one of the arguments in both the dirsize and cgsize
multiplication which means that the overflow bug in NetBSD has not actually
been fixed.

This patch does not change the cgsize calculation yet, it requires more

Source: NetBSD ffs_alloc.c/1.74 from Barry Bouwsma of Tiengen.

19 years agoSince we are DragonFly we want to use the DragonFly version instead of the
Eirik Nygaard [Mon, 9 Aug 2004 15:06:44 +0000 (15:06 +0000)]
Since we are DragonFly we want to use the DragonFly version instead of the
FreeBSD one.

19 years agoSince we are DragonFly we want to use the DragonFly version instead of the
Eirik Nygaard [Mon, 9 Aug 2004 14:53:38 +0000 (14:53 +0000)]
Since we are DragonFly we want to use the DragonFly version instead of the
FreeBSD one.

19 years agoFix gcc 3.4 build.
Eirik Nygaard [Mon, 9 Aug 2004 14:47:54 +0000 (14:47 +0000)]
Fix gcc 3.4 build.
__FreeBSD_version is now not defined if __FreeBSD__ is not defined.

Reported by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> and
             "Martin P. Hellwig" <mhellwig@xs4all.nl>

19 years agoFix gcc 3.4 build.
Eirik Nygaard [Mon, 9 Aug 2004 14:40:08 +0000 (14:40 +0000)]
Fix gcc 3.4 build.
__FreeBSD_version is now not defined if __FreeBSD__ is not defined.

Reported by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> and
             "Martin P. Hellwig" <mhellwig@xs4all.nl>

19 years agoFix gcc 3.4 build.
Eirik Nygaard [Mon, 9 Aug 2004 13:55:35 +0000 (13:55 +0000)]
Fix gcc 3.4 build.
__FreeBSD_version is now not defined if __FreeBSD__ is not defined.

Reported by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> and
             "Martin P. Hellwig" <mhellwig@xs4all.nl>

19 years agoDocument that there seems to be a problem with the syncer not running
David Rhodus [Mon, 9 Aug 2004 02:59:31 +0000 (02:59 +0000)]
Document that there seems to be a problem with the syncer not running
here and that we are using a work around. If a buffer won't flush after
6 attempts we allow the syncer to run to process any soft update
dependency lists.

19 years agoGet cosmetic changes out of the way before committing SACK.
Jeffrey Hsu [Sun, 8 Aug 2004 06:33:24 +0000 (06:33 +0000)]
Get cosmetic changes out of the way before committing SACK.

19 years agoAdd bzip2 to the bootstrap tools list. The compat libs (if enabled in
Matthew Dillon [Sun, 8 Aug 2004 03:21:59 +0000 (03:21 +0000)]
Add bzip2 to the bootstrap tools list.  The compat libs (if enabled in
make.conf) need it.

19 years agoImprove compatibility with older FreeBSD-4.x systems when cross-building
Matthew Dillon [Sat, 7 Aug 2004 21:38:16 +0000 (21:38 +0000)]
Improve compatibility with older FreeBSD-4.x systems when cross-building
the DragonFly world by having the bootstrap and build tools use the
bootstrap/buildtools binaries.  In particular, we need the -i option to
patch to work to properly build csh.

19 years agoDo not hack a #define __FreeBSD_version if __FreeBSD__ does not exist,
Matthew Dillon [Sat, 7 Aug 2004 21:22:25 +0000 (21:22 +0000)]
Do not hack a #define __FreeBSD_version if __FreeBSD__ does not exist,
to keep our gcc-3.4 builds freebsd-free.

Suggested-by: Richard Nyberg <rnyberg@it.su.se>
19 years agoRemove the unconditional timer_restore in the bios call path, it is
Matthew Dillon [Sat, 7 Aug 2004 03:42:37 +0000 (03:42 +0000)]
Remove the unconditional timer_restore in the bios call path, it is
creating more problems then it is solving.

19 years agoAdd an event handler to adjust the cpu throttle state automatically when
Matthew Dillon [Sat, 7 Aug 2004 00:59:53 +0000 (00:59 +0000)]
Add an event handler to adjust the cpu throttle state automatically when
power is disconnected and when power is reconnected.  See 'sysctl hw.acpi'.
The new sysctls are hw.acpi.cpu.performance_speed and