18 years agoMerge from vendor branch FILE:
Jeroen Ruigrok/asmodai [Sat, 18 Dec 2004 17:18:06 +0000 (17:18 +0000)]
Merge from vendor branch FILE:
Add file 4.12.

18 years agoAdd file 4.12.
Jeroen Ruigrok/asmodai [Sat, 18 Dec 2004 17:18:06 +0000 (17:18 +0000)]
Add file 4.12.

18 years agoRemove obsolete/unused file.
Jeroen Ruigrok/asmodai [Sat, 18 Dec 2004 16:39:39 +0000 (16:39 +0000)]
Remove obsolete/unused file.

18 years agoRegenerate.
Jeroen Ruigrok/asmodai [Sat, 18 Dec 2004 16:00:07 +0000 (16:00 +0000)]

18 years agoAdd some nForce2 identifiers.
Jeroen Ruigrok/asmodai [Sat, 18 Dec 2004 15:59:36 +0000 (15:59 +0000)]
Add some nForce2 identifiers.

18 years agoMerge from vendor branch OPENSSL:
Jeroen Ruigrok/asmodai [Sat, 18 Dec 2004 15:29:53 +0000 (15:29 +0000)]
Merge from vendor branch OPENSSL:
Add OpenSSL 0.9.7e.

Notable changes:

- Fix race condition in CRL checking code.
- Fixes to PKCS#7 (S/MIME) code.

18 years agoAdd OpenSSL 0.9.7e.
Jeroen Ruigrok/asmodai [Sat, 18 Dec 2004 15:29:53 +0000 (15:29 +0000)]
Add OpenSSL 0.9.7e.

Notable changes:

- Fix race condition in CRL checking code.
- Fixes to PKCS#7 (S/MIME) code.

18 years agoCleanup missing and duplicate defines from the last commit, rename an
Matthew Dillon [Sat, 18 Dec 2004 06:22:48 +0000 (06:22 +0000)]
Cleanup missing and duplicate defines from the last commit, rename an
entry in umass to conform.

Reported-by: "Alexander \"alxl\" Lobachov" <alxl@alxl.info>
18 years agotest
Sascha Wildner [Fri, 17 Dec 2004 21:13:46 +0000 (21:13 +0000)]

18 years agoReduce white space diffs between FreeBSD.
Max Okumoto [Fri, 17 Dec 2004 21:09:04 +0000 (21:09 +0000)]
Reduce white space diffs between FreeBSD.

18 years agoSynchronize usbdevs with NetBSD and regenerate.
Matthew Dillon [Fri, 17 Dec 2004 20:50:46 +0000 (20:50 +0000)]
Synchronize usbdevs with NetBSD and regenerate.

Submitted-by: Barry Bouwsma
18 years agoRegenerate.
Jeroen Ruigrok/asmodai [Fri, 17 Dec 2004 16:08:48 +0000 (16:08 +0000)]

18 years agoMajor cleanup and expansion of the NVIDIA id section.
Jeroen Ruigrok/asmodai [Fri, 17 Dec 2004 16:08:21 +0000 (16:08 +0000)]
Major cleanup and expansion of the NVIDIA id section.

18 years agoMissed removal of a file, in previous commit.
Max Okumoto [Fri, 17 Dec 2004 08:20:32 +0000 (08:20 +0000)]
Missed removal of a file, in previous commit.

18 years agoFix a long-standing bug when make(1) is passed the -V and
Max Okumoto [Fri, 17 Dec 2004 08:17:05 +0000 (08:17 +0000)]
Fix a long-standing bug when make(1) is passed the -V and
-f options in MAKEFLAGS environment variable, and some of
these options are also specified on the command line.

Taken-from: FreeBSD
Author: ru

18 years agoInstead of dynamically allocating list heads allocated them statically
Max Okumoto [Fri, 17 Dec 2004 08:13:30 +0000 (08:13 +0000)]
Instead of dynamically allocating list heads allocated them statically
now that their size is only two pointers. This eliminates a lot of calls
to Lst_Init and from there to malloc together with many calls to
Lst_Destroy (in places where the list is obviously empty). This also
reduces the chance to leave a list uninitilized so we can remove more
NULL pointer checks and probably eliminates a couple of memory leaks.

Taken-from: FreeBSD
Author: harti

18 years agoo Remove a useless list where just all command lines are stuffed
Max Okumoto [Fri, 17 Dec 2004 08:09:58 +0000 (08:09 +0000)]
o Remove a useless list where just all command lines are stuffed
  onto, never used and just freed at the end. The idea might have
  been to be able to free all the strings, but what's the point to
  free just before exiting?

o Remove a list that used to hold all the GNodes just to be able
  to free them just before exiting.

o Remove a list that was just used to free all variables just before

Taken-from: FreeBSD
Author: harti

18 years agoNobody actually checked the return codes from Lst_Append and
Max Okumoto [Fri, 17 Dec 2004 08:07:49 +0000 (08:07 +0000)]
Nobody actually checked the return codes from Lst_Append and
Lst_Insert so don't return anything.

Taken-from: FreeBSD
Author: harti

18 years agoIf a path element directory was never opened it is not on the list of
Max Okumoto [Fri, 17 Dec 2004 08:06:12 +0000 (08:06 +0000)]
If a path element directory was never opened it is not on the list of
open directories so there is no need to remove it from there. This fixes
a core dump introduced by removing the run-time check from Lst_Remove.

Taken-from: FreeBSD
Author: harti

18 years agoo Don't free the second list in Lst_Concat for LST_CONCLINK; free
Max Okumoto [Fri, 17 Dec 2004 08:01:40 +0000 (08:01 +0000)]
o Don't free the second list in Lst_Concat for LST_CONCLINK; free
  it in the caller instead.

o Remove return value from Lst_Concat. None of the callers ever
  checked it. Remove stuff that was needed for circular lists.

o Don't check the return code from Lst_Remove. There is no way that
  the list's first element is not on the list.

o No caller checks the return code from Lst_Remove, so don't return
  one.  Simplify the algorithm now that circular lists are gone.

o Now that circular lists are gone remove stuff for them. Simplify
  somewhat so that we can remove a local variable.

Taken-from: FreeBSD
Author: harti

18 years agoGet rid of the sequential access feature of the lists. This was
Max Okumoto [Fri, 17 Dec 2004 07:56:08 +0000 (07:56 +0000)]
Get rid of the sequential access feature of the lists. This was
used only in a couple of places and all of them except for one were
easily converted to use Lst_First/Lst_Succ. The one place is
compatibility mode in job.c where the it was used to advance to the
next command on each invocation of JobStart. For this case add a
pointer to the node to hold the currently executed command.

Take-from: FreeBSD
Author: harti

18 years agoConstify the arguments to the list compare function. This temporarily
Max Okumoto [Fri, 17 Dec 2004 07:53:57 +0000 (07:53 +0000)]
Constify the arguments to the list compare function. This temporarily
requires to make a copy of the filename in ReadMakefile and to
duplicate two small functions in suff.c. This hopefully will go
away when everything is constified.

Taken-from: FreeBSD
Author: harti

18 years agoConstify some calls of Buf_AddBytes.
Max Okumoto [Fri, 17 Dec 2004 07:05:22 +0000 (07:05 +0000)]
Constify some calls of Buf_AddBytes.

18 years agoVFS messaging/interfacing work stage 10/99:
Matthew Dillon [Fri, 17 Dec 2004 00:18:49 +0000 (00:18 +0000)]
VFS messaging/interfacing work stage 10/99:

Start adding the journaling, range locking, and (very slightly) cache
coherency infrastructure.  Continue cleaning up the VOP operations vector.

Expand on past commits that gave each mount structure its own set of VOP
operations vectors by adding additional vector sets for journaling or
cache coherency operations.  Remove the vv_jops and vv_cops fields
from the vnode operations vector in favor of placing those vop_ops directly
in the mount structure.  Reorganize the VOP calls as a double-indirect
and add a field to the mount structure which represents the current
vnode operations set (which will change when e.g. journaling is turned on
or off).  This creates the infrastructure necessary to allow us to stack
a generic journaling implementation on top of a filesystem.

Introduce a hard range-locking API for vnodes.   This API will be used by
high level system/vfs calls in order to handle atomicy guarentees.  It is
a prerequisit for: (1) being able to break I/O's up into smaller pieces
for the vm_page list/direct-to-DMA-without-mapping goal, (2) to support
the parallel write operations on a vnode goal, (3) to support the clustered
(remote) cache coherency goal, and (4) to support massive parallelism in
dispatching operations for the upcoming threaded VFS work.

This commit represents only infrastructure and skeleton/API work.

18 years agoChanged comment to match code.
Max Okumoto [Fri, 17 Dec 2004 00:09:17 +0000 (00:09 +0000)]
Changed comment to match code.

18 years agoTypedefs of pointers to structs are evil. Make Lst and LstNode typedef of
Max Okumoto [Fri, 17 Dec 2004 00:02:57 +0000 (00:02 +0000)]
Typedefs of pointers to structs are evil. Make Lst and LstNode typedef of
the structs itself not of pointers to them. This will simplify constification.

Taken-from: FreeBSD
Author: harti

18 years agoConstification of arguments passed to functions; no change on the
Max Okumoto [Thu, 16 Dec 2004 23:52:16 +0000 (23:52 +0000)]
Constification of arguments passed to functions; no change on the
resulting executable.  Submitted by:  Max Okumoto <okumoto@ucsd.edu>

Taken-from: FreeBSD
Author: harti

18 years agoMake needs no circular lists so remove them from the list code.
Max Okumoto [Thu, 16 Dec 2004 23:24:10 +0000 (23:24 +0000)]
Make needs no circular lists so remove them from the list code.

Taken-from: FreeBSD
Author: harti

18 years agoSome constification which doesn't require code rewrites.
Max Okumoto [Thu, 16 Dec 2004 23:22:15 +0000 (23:22 +0000)]
Some constification which doesn't require code rewrites.

Taken-from: FreeBSD
Author: harti

18 years agoo Remove an unused macro
Max Okumoto [Thu, 16 Dec 2004 23:08:36 +0000 (23:08 +0000)]
o Remove an unused macro
o Style: fix indentation.

Taken-from: FreeBSD
Author: harti

18 years agoAdd weak fake pthread functions, which always fail. This is needed to
Joerg Sonnenberger [Thu, 16 Dec 2004 22:55:29 +0000 (22:55 +0000)]
Add weak fake pthread functions, which always fail. This is needed to
allow non-threaded programs to link thread-aware libraries or dlopen
such shared objects. A similiar "solution" has been used by
XFree86 / Xorg for years in form of libXThrStub, but this was recently
retired. It can be a considered a short term solution until libcr is

Submitted-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
18 years agoConstify arguments to Hash_FindEntry and Hash_CreateEntry.
Max Okumoto [Thu, 16 Dec 2004 22:28:09 +0000 (22:28 +0000)]
Constify arguments to Hash_FindEntry and Hash_CreateEntry.

Taken-from: FreeBSD
Author: harti

18 years agoo Remove an extra space.
Max Okumoto [Thu, 16 Dec 2004 22:23:59 +0000 (22:23 +0000)]
o Remove an extra space.
o Style: fix indentation, prototypes for functions even in comment.
o Remove extra empty lines.

Taken-from: FreeBSD
Author: harti

18 years agoUse size_t to fix 64-bit platforms
Max Okumoto [Thu, 16 Dec 2004 22:20:12 +0000 (22:20 +0000)]
Use size_t to fix 64-bit platforms

Taken-from: FreeBSD
Author: harti

18 years agoMake sizes to be of type size_t and correct function arguments that
Max Okumoto [Thu, 16 Dec 2004 22:05:23 +0000 (22:05 +0000)]
Make sizes to be of type size_t and correct function arguments that
should be Byte (as the numerous casts to Byte in the function calls
show).  Put macro arguments in paranthesis.

Taken-from: FreeBSD
Author: harti

18 years agoStyle: fix indentation, protect macro with do { } while (0).
Max Okumoto [Thu, 16 Dec 2004 21:58:14 +0000 (21:58 +0000)]
Style: fix indentation, protect macro with do { } while (0).

Taken-from: FreeBSD
Author: harti

18 years agoUse __arysize() to cal size of array.
Max Okumoto [Thu, 16 Dec 2004 21:38:04 +0000 (21:38 +0000)]
Use __arysize() to cal size of array.

18 years agoChange the algorithm that matches the builtin shells from the name keyword
Max Okumoto [Thu, 16 Dec 2004 21:28:28 +0000 (21:28 +0000)]
Change the algorithm that matches the builtin shells from the name keyword
of the .SHELL target. Formerly it used to select the shell with the
longest common trailing substring, so that bash would select sh, but pocsh
would select csh. Now an exact match is required so that specifying bash
without also giving a path and the other keywords will give an error.

Taken-from: FreeBSD
Author: harti

18 years agoRegenerate.
Jeroen Ruigrok/asmodai [Thu, 16 Dec 2004 14:04:10 +0000 (14:04 +0000)]

18 years agoAdd more detail to the 845, 865, and 915 family.
Jeroen Ruigrok/asmodai [Thu, 16 Dec 2004 14:03:18 +0000 (14:03 +0000)]
Add more detail to the 845, 865, and 915 family.
The 2573 is not 82801, but the 848/865 PCI-CSA.
Add E7520 and E7525 details.

18 years agoFix the keyboard lockup problem. There were two big clues: The first was a
Matthew Dillon [Thu, 16 Dec 2004 08:30:15 +0000 (08:30 +0000)]
Fix the keyboard lockup problem.  There were two big clues:  The first was a
report that it sometimes seemed to occur during heavy video operations.  The
second was a set of kernel dates from Jansen Gotis and Michael Powell that
focused me in on the right part of the code.

Simply put, there is a hack for AT keyboards that polls the keyboard for
data 10 times a second in order to catch lost interrupts.  Lost interrupts
can occur because unlike other interrupts the AT keyboard interrupt is
edge-triggered.  This means that latency in the system can cause the
keyboard interrupt to retrigger before it is reenabled after an earlier
event but not cause any further interrupts.

There is a big hack in the system that polls for keyboard data 10 times a
second in order to detect this 'lost' interrupt case.  However, that code
was broken by the timeout->callout work I did on September 19th.  An
incorrectly placed callout_reset() stopped the polling code in its tracks.

Reported-by: Jeroen Ruigrok/asmodai <asmodai@wxs.nl>,
Chris Pressey <cpressey@catseye.mine.nu>,
Michael Powell <nightrecon@hotmail.com>,
Jansen Gotis <jtgotis@gmail.com>,
And others.

18 years ago'bool' is a really bad name for a variable, rename it.
Matthew Dillon [Thu, 16 Dec 2004 03:39:05 +0000 (03:39 +0000)]
'bool' is a really bad name for a variable, rename it.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
18 years agoCorrect a bug where incoming connections do not properly initialize the
Matthew Dillon [Thu, 16 Dec 2004 03:37:30 +0000 (03:37 +0000)]
Correct a bug where incoming connections do not properly initialize the
inflight bandwidth calculator.

Reorg the code a bit, removing random initialization elsewhere and putting
it all in one place.

Add an idle check and a pure-ack check.

Reported-by: Dan Nelson <dnelson@allantgroup.com>
18 years agoBump WARNS to 6.
Chris Pressey [Thu, 16 Dec 2004 00:32:07 +0000 (00:32 +0000)]
Bump WARNS to 6.

18 years agoRemove a double test for the same ptr != NULL and use the official
Max Okumoto [Thu, 16 Dec 2004 00:28:13 +0000 (00:28 +0000)]
Remove a double test for the same ptr != NULL and use the official
macro for this; reorder an if.

Taken-from: FreeBSD
Author: harti

18 years agoStyle: remove a lot of unnecessary casts, add some and spell the null
Max Okumoto [Thu, 16 Dec 2004 00:17:05 +0000 (00:17 +0000)]
Style: remove a lot of unnecessary casts, add some and spell the null
pointer constant as NULL.

Checked by: diff -r on the object files before and after

Taken-from: FreeBSD
Author: harti

18 years agoFix code that modifies const string variables.
Max Okumoto [Thu, 16 Dec 2004 00:03:54 +0000 (00:03 +0000)]
Fix code that modifies const string variables.

18 years agoOopsie; use WARNS?=, not WARNS=.
Chris Pressey [Wed, 15 Dec 2004 23:40:55 +0000 (23:40 +0000)]
Oopsie; use WARNS?=, not WARNS=.

18 years agoBump WARNS to 6.
Chris Pressey [Wed, 15 Dec 2004 23:22:57 +0000 (23:22 +0000)]
Bump WARNS to 6.

18 years agoBump WARNS to 6:
Chris Pressey [Wed, 15 Dec 2004 23:11:06 +0000 (23:11 +0000)]
Bump WARNS to 6:
- Initialize variable that GCC can't tell will never be used

18 years agoBump WARNS to 6.
Chris Pressey [Wed, 15 Dec 2004 21:27:40 +0000 (21:27 +0000)]
Bump WARNS to 6.

18 years agoRemove bool and boolean_t typedefs from header files where they don't belong,
Matthew Dillon [Wed, 15 Dec 2004 09:44:47 +0000 (09:44 +0000)]
Remove bool and boolean_t typedefs from header files where they don't belong,
fixing portions of the build.

18 years agoFix field for recent radix.h cleanups.
Matthew Dillon [Wed, 15 Dec 2004 09:27:05 +0000 (09:27 +0000)]
Fix field for recent radix.h cleanups.

18 years agoPatch up user/kernel space difference with boolean types.
Jeffrey Hsu [Wed, 15 Dec 2004 07:32:26 +0000 (07:32 +0000)]
Patch up user/kernel space difference with boolean types.

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

18 years agoClean up routing code before I parallelize it.
Jeffrey Hsu [Wed, 15 Dec 2004 00:11:04 +0000 (00:11 +0000)]
Clean up routing code before I parallelize it.

18 years agoFix a diagnostic check related to new VOP_INACTIVE semantics.
Matthew Dillon [Tue, 14 Dec 2004 23:59:47 +0000 (23:59 +0000)]
Fix a diagnostic check related to new VOP_INACTIVE semantics.

18 years agoDocument vmpageinfo.c
Matthew Dillon [Tue, 14 Dec 2004 23:58:32 +0000 (23:58 +0000)]
Document vmpageinfo.c

18 years ago- Add $DragonFly$ tag
Liam J. Foy [Tue, 14 Dec 2004 21:06:51 +0000 (21:06 +0000)]
- Add $DragonFly$ tag
- Add WARNS?= 6

18 years agoClean up routing code before I parallelize it.
Jeffrey Hsu [Tue, 14 Dec 2004 18:46:58 +0000 (18:46 +0000)]
Clean up routing code before I parallelize it.

18 years ago- Complete re-write/re-structure of rev(1). The previous code was ugly!
Liam J. Foy [Tue, 14 Dec 2004 18:22:09 +0000 (18:22 +0000)]
- Complete re-write/re-structure of rev(1). The previous code was ugly!

Thanks to Joerg, YONETANI Tomokazu and Matt.

Ok'ed by: Matt, Joerg and YONETANI Tomokazu

18 years agoRemove generic generating counting. I'm going to use a different approach
Joerg Sonnenberger [Tue, 14 Dec 2004 17:53:53 +0000 (17:53 +0000)]
Remove generic generating counting. I'm going to use a different approach
for the network stack and other parts in need of generation counting.

Requested-by: dillon
18 years agoAdd an example ntpd.conf. This is not installed by default, because
Joerg Sonnenberger [Tue, 14 Dec 2004 17:30:05 +0000 (17:30 +0000)]
Add an example ntpd.conf. This is not installed by default, because
administrators and users are encouraged to use personalized settings,
which means being aware of this file first.

Requested-by: Erik Paulsen Skaalerud
Inspired-by: OpenBSD's src/etc/ntpd.conf
18 years agoRegenerate.
Jeroen Ruigrok/asmodai [Tue, 14 Dec 2004 16:08:40 +0000 (16:08 +0000)]

18 years agoMerge from vendor branch NTPD:
Joerg Sonnenberger [Tue, 14 Dec 2004 16:05:57 +0000 (16:05 +0000)]
Merge from vendor branch NTPD:
Sync with OpenBSD.

18 years agoSync with OpenBSD.
Joerg Sonnenberger [Tue, 14 Dec 2004 16:05:57 +0000 (16:05 +0000)]
Sync with OpenBSD.

18 years agoAdd IDs for the following:
Jeroen Ruigrok/asmodai [Tue, 14 Dec 2004 16:04:04 +0000 (16:04 +0000)]
Add IDs for the following:
Intel E7205 Memory Controller Hub
Intel 915G/P/GV DRAM Controller
Intel 915G/P/GV Host-to-PCI Express Bridge
Intel 82801FB/FR LPC Interface Bridge
Intel 82801FB/FR/FW/FRW USB UHCI Controller
Intel 82801FB/FR/FW/FRW USB EHCI Controller
Intel 82801FB/FR/FW/FRW SMBus Controller

18 years agoDo not reinitialize the translation mode if reattaching to an existing
Matthew Dillon [Tue, 14 Dec 2004 02:27:00 +0000 (02:27 +0000)]
Do not reinitialize the translation mode if reattaching to an existing
keyboard state, aka the console.  Otherwise we might change the mode out
from under X and screw up X's translation of keyboard strokes.

This allows a USB keyboard to be unplugged and replugged in without messing
up X.

18 years agoAdd dependency for libcrypto to dc(1). Don't build bc and dc if
Joerg Sonnenberger [Mon, 13 Dec 2004 21:48:16 +0000 (21:48 +0000)]
Add dependency for libcrypto to dc(1). Don't build bc and dc if
NO_OPENSSL is specified.

18 years agoAdd back missing space after comma.
Max Okumoto [Mon, 13 Dec 2004 21:45:05 +0000 (21:45 +0000)]
Add back missing space after comma.

18 years ago- Restructure the code
Liam J. Foy [Mon, 13 Dec 2004 17:43:57 +0000 (17:43 +0000)]
- Restructure the code
- Update functions to ANSI style
- Remove register
- Make variables const
- Remove filename, unnecessary (we can use argv)
- Avoid repeated checks on *argv
- If ferror returns an error, we must reset the error indicator
  with clearerr(). We must do this incase another error occurs
  on file ++argv
- Add WARNS 6
- Static functions
- Add $DragonFly$ tag to Makefile

OK'ed: Joerg@

18 years ago- Remove both errno.h and string.h. Both are unnecessary.
Liam J. Foy [Mon, 13 Dec 2004 14:08:44 +0000 (14:08 +0000)]
- Remove both errno.h and string.h. Both are unnecessary.
- Better error message
- Add WARNS 6

OK'ed: Joerg@

18 years ago- We should warn with argv[i] not argv[1]
Liam J. Foy [Sun, 12 Dec 2004 17:01:05 +0000 (17:01 +0000)]
- We should warn with argv[i] not argv[1]
- err -> warn (we can continue)
- Return with error if any fsyncs fail
- Add WARNS?= 6

18 years agoMerge from FreeBSD:
Jeffrey Hsu [Sat, 11 Dec 2004 01:04:00 +0000 (01:04 +0000)]
Merge from FreeBSD:
  revision 1.102
  date: 2003/02/08 15:05:15;  author: orion;  state: Exp;  lines: +7 -6
  Avoid multiply for preemptive arp calculation since it hits every
  ethernet packet sent.

  Prompted by: Jeffrey Hsu <hsu@FreeBSD.org>

18 years agovm_page_free_*() now requires the page to be busied, fix a case in
Matthew Dillon [Fri, 10 Dec 2004 23:07:10 +0000 (23:07 +0000)]
vm_page_free_*() now requires the page to be busied, fix a case in
vm_page_unhold() where that was not occuring.

18 years agoBring in elements from the FreeBSD usbdevs that the DFly usbdevs does not
Matthew Dillon [Fri, 10 Dec 2004 20:37:55 +0000 (20:37 +0000)]
Bring in elements from the FreeBSD usbdevs that the DFly usbdevs does not

Submitted-by: Barry Bouwsma
18 years agoRemove more whitespace.
Max Okumoto [Fri, 10 Dec 2004 20:34:01 +0000 (20:34 +0000)]
Remove more whitespace.

Check-by: diff on make *.o lst.lib/*.o
18 years agoBring in FreeBSD/1.206 by Alan Cox, bde@, and tegge@:
Matthew Dillon [Fri, 10 Dec 2004 19:50:32 +0000 (19:50 +0000)]
Bring in FreeBSD/1.206 by Alan Cox, bde@, and tegge@:

Almost nine years ago, when support for 1TB files was introduced in
revision 1.55, the address parameter to vnode_pager_addr() was changed
from an unsigned 32-bit quantity to a signed 64-bit quantity.  However,
an out-of-range check on the address was not updated.  Consequently,
memory-mapped I/O on files greater than 2GB could cause a kernel panic.
Since the address is now a signed 64-bit quantity, the problem resolution
is simply to remove a cast.

PR: FreeBSD/73010

18 years agoStylification: missing spaces, extra space after function names,
Max Okumoto [Fri, 10 Dec 2004 19:22:25 +0000 (19:22 +0000)]
Stylification: missing spaces, extra space after function names,
casts and the sizeof operator, missing empty lines, void casts,
extra empty lines.

Checked by: diff on make *.o lst.lib/*.o

Author: harti, okumoto

18 years agoRemove unnecessary weird locking macro I added to blindly replace
YONETANI Tomokazu [Fri, 10 Dec 2004 04:09:46 +0000 (04:09 +0000)]
Remove unnecessary weird locking macro I added to blindly replace
mtx_*() functions. Original code needed the mutex functions because
spl*() functions are practically no-ops on FreeBSD 5.x and later
while they aren't on FreeBSD 4.x or DragonFly. Tested on both UP
and SMP boxes without a problem. No noticeable difference on
performance though.
DragonFly_Stable tag will be slipped in a few days if no bug reports
are posted to bugs@.

18 years agoAdd code to enforce the paralleism count (-j N) for the entire tree
Max Okumoto [Fri, 10 Dec 2004 01:16:25 +0000 (01:16 +0000)]
Add code to enforce the paralleism count (-j N) for the entire tree
of submakes spawned during processing.

We create a fifo and stuff one character into it for each job we are
allowed to run.  The name of the fifo is passed to child processes
in the MAKE_JOBS_FIFO environment variable.

A make which finds this variable on startup will open the fifo and
only spawn jobs when it managed to read a token from the fifo.
When the job completes a token is writen back to the fifo.

Slave make processes get one token for free: the one their parent
make got in order to run them.  This makes the make processes
themselves invisible in the process counts.

The net effect is that "make -j 12 -s buildworld" will start at
most 12 jobs at the same time, instead of as previously up to
65 jobs would get started.

Taken-from: FreeBSD
Author: phk

18 years agoReduce the casts off NULL in comparison with a pointer.
Max Okumoto [Fri, 10 Dec 2004 01:13:24 +0000 (01:13 +0000)]
Reduce the casts off NULL in comparison with a pointer.

18 years agoo Allow use of the ${MAKE_SHELL} variable to specify alternate
Max Okumoto [Fri, 10 Dec 2004 01:03:46 +0000 (01:03 +0000)]
o Allow use of the ${MAKE_SHELL} variable to specify alternate
  shells for make(1) to use.  Setting it to "sh" and "ksh" are the
  only values which work right ATM; I wouldn't expect "csh" to get
  you far ;)

o Include -DDEFSHELL=1 in Makefile.dist so people boostrapping will
  have a sane default.  And add DragonFly tag

o Add ability to use csh(1) as the make(1) shell.

o Expand the scope of the .SHELL specification to also cover the
  compat mode of operation and the != operator.

  While here, fixed a bug in the .SHELL directive processing when
  only the name= attribute is specified and no built-in shell matches
  this name, causing null pointer dereference.

o Fix a very long-standing error in handling .SHELL targets: this
  target uses the brk_string function to parse the line. That
  function uses static storage for both the expanded string and the
  returned argv[] vector.   The JobParseShell function simply stored
  away pointers into this static storage. On the next use of something
  like ${FOO:O} this storage would get overwritten with fatal

  This also allows us to make the shells[] array const bringing us
  one step further in making make WARNS=4 ready.

o Constify the array of predefined shells. It turns out that we
  need two versions of the structure definition for this: one with
  const char pointers, because otherwise gcc won't let us initialize
  the fields with constant strings, and one without the const,
  because we need to work with the structure.

Note: This patch is really a hack for a coping with slow /bin/sh.
      We are importing it to reduce the differences between us and
      the FreeBSD version.

18 years agoTake advantage of the .Nm utility. It remembers the first argument
Max Okumoto [Fri, 10 Dec 2004 00:41:06 +0000 (00:41 +0000)]
Take advantage of the .Nm utility.  It remembers the first argument
it was called with.

18 years agoo Reduce warns by adding default case to switch.
Max Okumoto [Fri, 10 Dec 2004 00:38:21 +0000 (00:38 +0000)]
o Reduce warns by adding default case to switch.
o Constify char pointer.

18 years agoMove catch_child() to reduce diffs between FreeBSD make.
Max Okumoto [Thu, 9 Dec 2004 23:33:36 +0000 (23:33 +0000)]
Move catch_child() to reduce diffs between FreeBSD make.

18 years agoAdd missing function description.
Max Okumoto [Thu, 9 Dec 2004 21:31:10 +0000 (21:31 +0000)]
Add missing function description.


18 years agoChange a couple of the primitve list functions to be macros. This changes
Max Okumoto [Thu, 9 Dec 2004 19:16:03 +0000 (19:16 +0000)]
Change a couple of the primitve list functions to be macros. This changes
the semantic of Lst_Datum which formerly returned NULL when the argument
node was NULL. There was only one place in the source that relied on this
so change that place.

Taken-From: FreeBSD
Author: harti

18 years agoUse typedefs for the types of the functions that are passed as
Max Okumoto [Thu, 9 Dec 2004 19:08:36 +0000 (19:08 +0000)]
Use typedefs for the types of the functions that are passed as
arguments to the list functions for better readability.

18 years agoCache a pointer the last mbuf in the sockbuf for faster insertion.
Jeffrey Hsu [Wed, 8 Dec 2004 23:59:01 +0000 (23:59 +0000)]
Cache a pointer the last mbuf in the sockbuf for faster insertion.
Update it on sockbuf insertion and deletion and on user reads.
Add a new sbappendstream() function that inserts in constant time.
Use it for TCP.

18 years agoImplement generation counters as (at least) 64 bit counters. The increment
Joerg Sonnenberger [Wed, 8 Dec 2004 23:19:51 +0000 (23:19 +0000)]
Implement generation counters as (at least) 64 bit counters. The increment
and get operations are interrupt safe, but not MP-safe.

The gencount_inc implementation uses critical sections, which is the best
possible for generic IA32 code.

18 years ago- Whoops! I missed some from the previous commit. My bad, sorry.
Liam J. Foy [Wed, 8 Dec 2004 22:26:42 +0000 (22:26 +0000)]
- Whoops! I missed some from the previous commit. My bad, sorry.

Ok'ed by: Joerg@

18 years ago- Check the return value of setenv(). We should check this value since
Liam J. Foy [Wed, 8 Dec 2004 22:00:32 +0000 (22:00 +0000)]
- Check the return value of setenv(). We should check this value since
  setenv() uses both malloc and realloc.

18 years agoMark the following stuff as depricated:
Joerg Sonnenberger [Wed, 8 Dec 2004 20:36:39 +0000 (20:36 +0000)]
Mark the following stuff as depricated:
- GPLed math emulator
- GPLed dgb driver
- GPLed awe driver
- old pre-newbus rp driver (use nrp instead)
- OLDCARD aka pcic (also not build as module by default)

This can be temporary reviewd by adding "options I_WANT_DEPRICATED_STUFF"
to the kernel config. This drivers will move into the attic two
weeks from now if noone complains.

18 years ago- We should always check the setenv() call. Why? because it uses
Liam J. Foy [Wed, 8 Dec 2004 20:17:12 +0000 (20:17 +0000)]
- We should always check the setenv() call. Why? because it uses
  both realloc and malloc.
- Remove unnecessary casts.
- Bump WARNS to 6

18 years agoTrying again. Anyone see this mail?
Max Okumoto [Wed, 8 Dec 2004 19:45:30 +0000 (19:45 +0000)]
Trying again.  Anyone see this mail?


18 years agoAdd my stuff.
Max Okumoto [Wed, 8 Dec 2004 19:08:25 +0000 (19:08 +0000)]
Add my stuff.

18 years agotest
Matthew Dillon [Wed, 8 Dec 2004 19:00:58 +0000 (19:00 +0000)]

18 years agoUnlock the namecache record when traversing a mount point, then relock and
Matthew Dillon [Wed, 8 Dec 2004 18:53:27 +0000 (18:53 +0000)]
Unlock the namecache record when traversing a mount point, then relock and
recheck for consistency.  This fixes a deadlock on e.g. dead NFS mounts.

Reported-by: David Rhodus <sdrhodus@gmail.com>
18 years agoMerge the contents of lstInt.h into the public lst.h. This let's us get
Max Okumoto [Wed, 8 Dec 2004 11:26:39 +0000 (11:26 +0000)]
Merge the contents of lstInt.h into the public lst.h. This let's us get
rid of a lot of uneccesary casts and temporary variables that have just
obfuscated the code. This also let's us implement a couple of the one-
liner list functions as macros (the first one is Lst_IsEmpty) and
simplify life once we start to throw consts on the code.

Taken-from: FreeBSD
Author: harti

18 years agoStyle: prototypes, un-register and remove some empty lines.
Max Okumoto [Wed, 8 Dec 2004 11:07:35 +0000 (11:07 +0000)]
Style: prototypes, un-register and remove some empty lines.

Taken-from: FreeBSD
Author: harti