]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoThis commit was generated by cvs2svn to compensate for changes in r115698,
des [Mon, 2 Jun 2003 15:04:15 +0000 (15:04 +0000)]
This commit was generated by cvs2svn to compensate for changes in r115698,
which included commits to RCS files with non-trunk default branches.

21 years agoRemove debugging output (perforce change #32378)
des [Mon, 2 Jun 2003 15:04:15 +0000 (15:04 +0000)]
Remove debugging output (perforce change #32378)

21 years agoAssorted mdoc(7) fixes.
ru [Mon, 2 Jun 2003 15:02:06 +0000 (15:02 +0000)]
Assorted mdoc(7) fixes.

21 years agoFix sectorsize != 512 on i386 and pc98. Add test cases for same.
phk [Mon, 2 Jun 2003 14:19:31 +0000 (14:19 +0000)]
Fix sectorsize != 512 on i386 and pc98.  Add test cases for same.

21 years agoAssorted mdoc(7) fixes.
ru [Mon, 2 Jun 2003 11:19:24 +0000 (11:19 +0000)]
Assorted mdoc(7) fixes.

21 years agoUnwind the _giant_mutex from pthread_detach(). When detaching a joiner thread
mtm [Mon, 2 Jun 2003 11:01:00 +0000 (11:01 +0000)]
Unwind the _giant_mutex from pthread_detach(). When detaching a joiner thread
it's important the correct lock order is observed: lock first the joined and
then the joiner.

21 years agoConsolidate static_init() and static_init_private into one function.
mtm [Mon, 2 Jun 2003 10:04:18 +0000 (10:04 +0000)]
Consolidate static_init() and static_init_private into one function.
The behaviour of this function is controlled by the argument: private.

21 years agoFix SIGINFO handling: do not print incorrect timing statistics
maxim [Mon, 2 Jun 2003 10:01:59 +0000 (10:01 +0000)]
Fix SIGINFO handling: do not print incorrect timing statistics
when the data for it is not available.

Founded by: ping -s0 localhost; press ^T

21 years agoFix a typo in an ATM media name. As this name was not use yet, no problems
harti [Mon, 2 Jun 2003 09:13:08 +0000 (09:13 +0000)]
Fix a typo in an ATM media name. As this name was not use yet, no problems
should occur.

21 years agoRemove unused #ifdef BRIDGE.
maxim [Mon, 2 Jun 2003 08:36:18 +0000 (08:36 +0000)]
Remove unused #ifdef BRIDGE.

Reviewed by: nyan

21 years ago[rev 1.26 log cont.]
obrien [Mon, 2 Jun 2003 08:13:49 +0000 (08:13 +0000)]
[rev 1.26 log cont.]
I got a bazaar bug report after someone did several back to back
'make worlds'.  I'm not sure how compiling /usr/src as C99 would cause
this, but be cautious and affective go back to previous state until I can
look into it.

21 years agoI got a bazzar bug report
obrien [Mon, 2 Jun 2003 08:10:57 +0000 (08:10 +0000)]
I got a bazzar bug report

21 years agoAdd zh_CN.GBK to ASCIILINKS
ache [Mon, 2 Jun 2003 07:53:44 +0000 (07:53 +0000)]
Add zh_CN.GBK to ASCIILINKS

21 years agoUse __FBSDID().
obrien [Mon, 2 Jun 2003 06:48:51 +0000 (06:48 +0000)]
Use __FBSDID().

21 years agoUse __FBSDID().
obrien [Mon, 2 Jun 2003 06:43:15 +0000 (06:43 +0000)]
Use __FBSDID().

21 years agoTurn back on c99, the tree should be ready for it now.
obrien [Mon, 2 Jun 2003 06:26:14 +0000 (06:26 +0000)]
Turn back on c99, the tree should be ready for it now.

21 years agoUse __FBSDID().
obrien [Mon, 2 Jun 2003 06:16:45 +0000 (06:16 +0000)]
Use __FBSDID().

21 years agoSomething funky is going on here... disabling CSTD makes it go away...
obrien [Mon, 2 Jun 2003 06:12:14 +0000 (06:12 +0000)]
Something funky is going on here... disabling CSTD makes it go away...

21 years agoUse __FBSDID().
obrien [Mon, 2 Jun 2003 06:02:49 +0000 (06:02 +0000)]
Use __FBSDID().

21 years agoMFi386: i386/include/asm.h rev 1.11: Do not abuse ##.
peter [Mon, 2 Jun 2003 05:59:35 +0000 (05:59 +0000)]
MFi386: i386/include/asm.h rev 1.11: Do not abuse ##.

21 years agoExplicitly compare the values returned by chdir(2) and chroot(2) to -1.
mtm [Mon, 2 Jun 2003 05:52:24 +0000 (05:52 +0000)]
Explicitly compare the values returned by chdir(2) and chroot(2) to -1.

21 years agoReplace if_fxp's handrolled defrag function with m_defrag.
silby [Mon, 2 Jun 2003 05:16:42 +0000 (05:16 +0000)]
Replace if_fxp's handrolled defrag function with m_defrag.

No actual bug with the existing code, just tidying things up.

Submitted by: hmp

21 years agoBump __FreeBSD_version to 510100 for 5.1-CURRENT
scottl [Mon, 2 Jun 2003 05:05:27 +0000 (05:05 +0000)]
Bump __FreeBSD_version to 510100 for 5.1-CURRENT

21 years agoWe are at 5.1-CURRENT now
scottl [Mon, 2 Jun 2003 04:58:43 +0000 (04:58 +0000)]
We are at 5.1-CURRENT now

21 years agoDocument netfs_types.
gordon [Mon, 2 Jun 2003 04:51:55 +0000 (04:51 +0000)]
Document netfs_types.

21 years agoFix a style nit.
obrien [Mon, 2 Jun 2003 03:26:03 +0000 (03:26 +0000)]
Fix a style nit.

Submitted by: ru

21 years agoDon't use ## to concatinate to two things that don't together make a C token.
obrien [Mon, 2 Jun 2003 02:41:38 +0000 (02:41 +0000)]
Don't use ## to concatinate to two things that don't together make a C token.
Two tokens that don't together form a vaid preprocssor token cannot be
pasted together using ANSI-C token concatinatation.  GCC 3.2's cpp, at least,
produces the desired result w/o using "##".

21 years agoDon't use a C compiler to assemble a pure asm file.
obrien [Mon, 2 Jun 2003 02:37:27 +0000 (02:37 +0000)]
Don't use a C compiler to assemble a pure asm file.

21 years agoBest we can do with this is c89.
obrien [Mon, 2 Jun 2003 02:35:58 +0000 (02:35 +0000)]
Best we can do with this is c89.

21 years agoInclude stdlib.h to get exit()'s prototype.
obrien [Mon, 2 Jun 2003 02:35:18 +0000 (02:35 +0000)]
Include stdlib.h to get exit()'s prototype.

21 years agoAdd the variable's type to the declaration.
obrien [Mon, 2 Jun 2003 02:34:36 +0000 (02:34 +0000)]
Add the variable's type to the declaration.

21 years ago.S comments must be C comments, not ASM ones.
obrien [Mon, 2 Jun 2003 02:32:56 +0000 (02:32 +0000)]
.S comments must be C comments, not ASM ones.

21 years agoUse C99 compatible ASM statements.
obrien [Mon, 2 Jun 2003 02:32:22 +0000 (02:32 +0000)]
Use C99 compatible ASM statements.

21 years agoDon't set a C standard level for ObjC code.
obrien [Mon, 2 Jun 2003 02:30:52 +0000 (02:30 +0000)]
Don't set a C standard level for ObjC code.

21 years agoUse ?= before someone brings it up.
obrien [Mon, 2 Jun 2003 02:29:26 +0000 (02:29 +0000)]
Use ?= before someone brings it up.

21 years agoCSTD=c89 due to mismatched declarations.
obrien [Mon, 2 Jun 2003 02:18:37 +0000 (02:18 +0000)]
CSTD=c89 due to mismatched declarations.

21 years agoTo quote Tony Maher <tonymaher@optushome.com.au>, "maybe 3rd time lucky ;-)"
obrien [Mon, 2 Jun 2003 01:01:42 +0000 (01:01 +0000)]
To quote Tony Maher <tonymaher@optushome.com.au>, "maybe 3rd time lucky ;-)"
*sigh* Just can't get a brake when trying to react too quickly and fix the build.

21 years agoCheck in some months long pending minor debug output changes.
mjacob [Mon, 2 Jun 2003 00:37:42 +0000 (00:37 +0000)]
Check in some months long pending minor debug output changes.

Clarify that the implicit fallthrough was *not* intentional (thanks, Poul!)
and reorganize the code so a correct fallthrough (with /* FALLTHROUGH */)
occurs.

21 years agoUse C99 compatable asm statements.
obrien [Mon, 2 Jun 2003 00:29:35 +0000 (00:29 +0000)]
Use C99 compatable asm statements.

21 years agoRevert accidental change: don't change the thread library for testing to
rwatson [Mon, 2 Jun 2003 00:21:41 +0000 (00:21 +0000)]
Revert accidental change: don't change the thread library for testing to
libthr.  Oops, sorry about that.

Submitted by: "Simon L. Nielsen" <simon@nitro.dk>

21 years agoo Fix a cut-n-paste bug. We were clobbering rp with gp...
marcel [Mon, 2 Jun 2003 00:16:39 +0000 (00:16 +0000)]
o  Fix a cut-n-paste bug. We were clobbering rp with gp...
o  Make sure the arguments to ctx_wrapper() are loaded from the
   backing store by forcing an underflow. Do this by making all
   registers in the register frame local.

21 years agoTemperarly turn off building the tree with c99.
obrien [Mon, 2 Jun 2003 00:11:07 +0000 (00:11 +0000)]
Temperarly turn off building the tree with c99.
I swore this made it thru a 'make world', but I don't know what happened.

21 years agoChange kernel_object and kmem_object to (&kernel_object_store) and
alc [Sun, 1 Jun 2003 23:59:48 +0000 (23:59 +0000)]
Change kernel_object and kmem_object to (&kernel_object_store) and
(&kmem_object_store), respectively.  This allows the address of these
objects to be resolved at link-time rather than run-time.

21 years agoUgg, wrong version.
obrien [Sun, 1 Jun 2003 23:39:16 +0000 (23:39 +0000)]
Ugg, wrong version.
CSTD=gnu89, c89 wont do.

21 years agoThis isn't C99 clean.
obrien [Sun, 1 Jun 2003 23:37:46 +0000 (23:37 +0000)]
This isn't C99 clean.

21 years agoImprove set_mcontext:
marcel [Sun, 1 Jun 2003 23:22:56 +0000 (23:22 +0000)]
Improve set_mcontext:
o  Don't copy psr verbatim from the user supplied context. Only allow
   userland to change the processor settings that are part of the user
   mask.

21 years agoImprove on cpu_set_upcall:
marcel [Sun, 1 Jun 2003 23:19:21 +0000 (23:19 +0000)]
Improve on cpu_set_upcall:
o  Use pcb and tf for the new pcb and the new trapframe and use pcb0
   for the old (current) pcb. The mix of pcb, pcb2 and tf was slightly
   confusing.
o  Don't define td->td_frame here. It has already been set previously
   by cpu_thread_setup. Add a KASSERT to make sure pcb and tf are both
   non-NULL.
o  Make sure the number of dirty registers is 0 for the new thread.
   There are no user registers on the backing store because we heven't
   enter userland yet.

21 years agoA new API function PacketAliasRedirectDynamic() can be used
ru [Sun, 1 Jun 2003 23:15:00 +0000 (23:15 +0000)]
A new API function PacketAliasRedirectDynamic() can be used
to mark a fully specified static link as dynamic; i.e. make
it a one-time link.

21 years agoInclude string.h for memset().
rwatson [Sun, 1 Jun 2003 23:03:49 +0000 (23:03 +0000)]
Include string.h for memset().

21 years agoMake the PacketAliasSetAddress() function call optional. If it
ru [Sun, 1 Jun 2003 22:49:59 +0000 (22:49 +0000)]
Make the PacketAliasSetAddress() function call optional.  If it
is not called, and no static rules match an outgoing packet, the
latter retains its source IP address.  This is in support of the
"static NAT only" mode.

21 years agoGive the -o option before any filename operands when invoking the sort
tjr [Sun, 1 Jun 2003 22:37:38 +0000 (22:37 +0000)]
Give the -o option before any filename operands when invoking the sort
utility. 1003.1-2001 does not allow sort to accept the -o option after
the operands (Base Definitions, 12.2 Utility Syntax Guidelines,
Guideline 9).

21 years agocrtstuff needs isn't compilable with C99 on Sparc64, so set CSTD to gnu89.
obrien [Sun, 1 Jun 2003 22:18:05 +0000 (22:18 +0000)]
crtstuff needs isn't compilable with C99 on Sparc64, so set CSTD to gnu89.

21 years agoUse a bigger hammer -- keep all -std= out of CXXFLAGS.
obrien [Sun, 1 Jun 2003 22:13:45 +0000 (22:13 +0000)]
Use a bigger hammer -- keep all -std= out of CXXFLAGS.
Also allow for "CSTD=" in a Makefile.

21 years agoChange a :
mux [Sun, 1 Jun 2003 22:09:12 +0000 (22:09 +0000)]
Change a :
bzero(ptr, sizeof(DC_RXLEN * 5));
which should obviously be:
bzero(ptr, DC_RXLEN * 5);

Looks like this bug may have reduced the effectiveness of the
workaround for the hardware bug in the PNIC chips.

MFC after: 1 week

21 years agoAssorted mdoc(7) fixes.
ru [Sun, 1 Jun 2003 21:52:59 +0000 (21:52 +0000)]
Assorted mdoc(7) fixes.

21 years agoMatch style of source and headers.
jmallett [Sun, 1 Jun 2003 21:35:27 +0000 (21:35 +0000)]
Match style of source and headers.

Submitted by: bde

21 years agoDo not set a C standard for the C++ compiler.
obrien [Sun, 1 Jun 2003 21:33:05 +0000 (21:33 +0000)]
Do not set a C standard for the C++ compiler.

21 years agoBe sloppier about the miidevs.h dependency. This reduces the maintenance
obrien [Sun, 1 Jun 2003 20:47:46 +0000 (20:47 +0000)]
Be sloppier about the miidevs.h dependency.  This reduces the maintenance
effort at the expense of making miidevs.h a dependency for very .o.

Requested by: imp

21 years agoAccpet '1'..'5' in place of F1..F5 for serial console users.
obrien [Sun, 1 Jun 2003 20:41:04 +0000 (20:41 +0000)]
Accpet '1'..'5' in place of F1..F5 for serial console users.

Reviewed by: Bruce M Simpson <bms@spc.org>

21 years agoShorten long comment.
obrien [Sun, 1 Jun 2003 20:28:20 +0000 (20:28 +0000)]
Shorten long comment.

21 years agoSync with i386/GENERIC ordering.
obrien [Sun, 1 Jun 2003 20:26:38 +0000 (20:26 +0000)]
Sync with i386/GENERIC ordering.

21 years agoKeep entries sorted by floppy, type, and name.
ru [Sun, 1 Jun 2003 20:01:05 +0000 (20:01 +0000)]
Keep entries sorted by floppy, type, and name.

21 years agoAssorted mdoc(7) fixes.
ru [Sun, 1 Jun 2003 19:52:36 +0000 (19:52 +0000)]
Assorted mdoc(7) fixes.

21 years agoAssorted mdoc(7) fixes.
ru [Sun, 1 Jun 2003 19:41:49 +0000 (19:41 +0000)]
Assorted mdoc(7) fixes.

21 years ago- Style(9) fixes, most notably :
mux [Sun, 1 Jun 2003 19:26:34 +0000 (19:26 +0000)]
- Style(9) fixes, most notably :
o Remove register keyword
o ANSIfy prototypes
o Remove "return;" at the end of void functions
o Remove trailing spaces
o Don't align local variables with tabs and reorder them
o Don't use /* FOO */ at the end of a #ifdef FOO block if
  it's a small block
- Other non-functional changes :
o 6 -> ETHER_ADDR_LEN
o Don't initialize if_output; ether_ifattach() does it for us

21 years agoAssorted mdoc(7) fixes.
ru [Sun, 1 Jun 2003 19:19:59 +0000 (19:19 +0000)]
Assorted mdoc(7) fixes.

21 years agoRestore parentheses removed inappropriately in last commit.
mjacob [Sun, 1 Jun 2003 19:01:01 +0000 (19:01 +0000)]
Restore parentheses removed inappropriately in last commit.

21 years agoCompile our code as C99 by default.
obrien [Sun, 1 Jun 2003 18:31:25 +0000 (18:31 +0000)]
Compile our code as C99 by default.

21 years agoAdd zh_CN.GBK
ache [Sun, 1 Jun 2003 15:51:27 +0000 (15:51 +0000)]
Add zh_CN.GBK

PR:             51504
Submitted by:   Statue <statue@freebsd.sinica.edu.tw>

21 years agoAdd zh_CN.GBK
ache [Sun, 1 Jun 2003 15:37:37 +0000 (15:37 +0000)]
Add zh_CN.GBK

21 years agoAdd GBK encoding
ache [Sun, 1 Jun 2003 15:30:56 +0000 (15:30 +0000)]
Add GBK encoding

PR:             51504
Submitted by:   Statue <statue@freebsd.sinica.edu.tw>

21 years agoAdd the part of the last commit which cvs appearantly didn't like
phk [Sun, 1 Jun 2003 15:05:22 +0000 (15:05 +0000)]
Add the part of the last commit which cvs appearantly didn't like
the first time.

21 years agoSimplify the GEOM OAM api: Drop the request type, and let everything
phk [Sun, 1 Jun 2003 13:47:51 +0000 (13:47 +0000)]
Simplify the GEOM OAM api:  Drop the request type, and let everything
hinge on the "verb" parameter which the class gets to interpret as
it sees fit.

Move the entire request into the kernel and move changed parameters
back when done.

21 years agoconstify g_sanity()
phk [Sun, 1 Jun 2003 13:30:39 +0000 (13:30 +0000)]
constify g_sanity()

21 years agoAdd openpam_readline(3).
des [Sun, 1 Jun 2003 12:54:51 +0000 (12:54 +0000)]
Add openpam_readline(3).

21 years agoVendor import of OpenPAM Digitalis.
des [Sun, 1 Jun 2003 12:54:03 +0000 (12:54 +0000)]
Vendor import of OpenPAM Digitalis.

21 years agoThis commit was generated by cvs2svn to compensate for changes in r115619,
des [Sun, 1 Jun 2003 12:54:03 +0000 (12:54 +0000)]
This commit was generated by cvs2svn to compensate for changes in r115619,
which included commits to RCS files with non-trunk default branches.

21 years agoAdd (but do not connect) a half-finished driver for Aureal Vortex cards.
des [Sun, 1 Jun 2003 11:58:46 +0000 (11:58 +0000)]
Add (but do not connect) a half-finished driver for Aureal Vortex cards.
The mixer works, pcm support is half done.

21 years agoRetire pam_wheel(8) (which has been disconnected for quite a while) and
des [Sun, 1 Jun 2003 11:50:35 +0000 (11:50 +0000)]
Retire pam_wheel(8) (which has been disconnected for quite a while) and
pam_ftp(8).

21 years agoAdd pc98 arch to test set.
phk [Sun, 1 Jun 2003 09:30:53 +0000 (09:30 +0000)]
Add pc98 arch to test set.
Remove ktrace which leaked out of test-setup.

21 years agoRemove break after return.
phk [Sun, 1 Jun 2003 09:27:33 +0000 (09:27 +0000)]
Remove break after return.
Add XXX comment where intent is unclear.

Found by: FlexeLint

21 years agoRemove #include <sys/disklabel.h>
phk [Sun, 1 Jun 2003 09:25:17 +0000 (09:25 +0000)]
Remove #include <sys/disklabel.h>

21 years agoDon't leak "barlist" allocation on failure.
phk [Sun, 1 Jun 2003 09:24:17 +0000 (09:24 +0000)]
Don't leak "barlist" allocation on failure.

Found by: FlexeLint

21 years agoRemove unused variables.
phk [Sun, 1 Jun 2003 09:20:38 +0000 (09:20 +0000)]
Remove unused variables.

Found by:       FlexeLint

21 years agoUse bcmp() to compare hash strings.
phk [Sun, 1 Jun 2003 09:18:49 +0000 (09:18 +0000)]
Use bcmp() to compare hash strings.

21 years agoClarify the code a bit.
phk [Sun, 1 Jun 2003 09:16:50 +0000 (09:16 +0000)]
Clarify the code a bit.

Submitted by: Nadav Eiron <nadav@TheEirons.org>

21 years agoDon't unlock the parent directory vnode twice if the ISDOTDOT flag
truckman [Sun, 1 Jun 2003 09:16:26 +0000 (09:16 +0000)]
Don't unlock the parent directory vnode twice if the ISDOTDOT flag
is set.

21 years agoRemove unused variables.
phk [Sun, 1 Jun 2003 09:12:24 +0000 (09:12 +0000)]
Remove unused variables.
Remove break after return.
Add XXX comment where intent is unclear.

Found by:       FlexeLint

21 years agoMake "where" an alias for "trace"
phk [Sun, 1 Jun 2003 09:06:23 +0000 (09:06 +0000)]
Make "where" an alias for "trace"

21 years agoAdd /* FALLTHROUGH */
phk [Sun, 1 Jun 2003 09:01:02 +0000 (09:01 +0000)]
Add /* FALLTHROUGH */

Found by: FlexeLint

21 years agoImplement cpu_thread_setup(). This is mostly the same as on i386,
marcel [Sun, 1 Jun 2003 08:29:43 +0000 (08:29 +0000)]
Implement cpu_thread_setup(). This is mostly the same as on i386,
except for the fact that trapframes have a size recorded in it
that we set here too. We need this for proper thread setup.

Pointed out by: mtm

21 years agoMake prototype match code with regard to constness of args to the
jmallett [Sun, 1 Jun 2003 06:43:39 +0000 (06:43 +0000)]
Make prototype match code with regard to constness of args to the
function pointer passed in.

21 years agoSplit the env(1) manpage off from printenv(1); there is not much point
tjr [Sun, 1 Jun 2003 06:29:47 +0000 (06:29 +0000)]
Split the env(1) manpage off from printenv(1); there is not much point
in keeping them together. Mention that printenv is obsolescent.

21 years agoFix up locking problems in fifo_open() and fifo_close():
truckman [Sun, 1 Jun 2003 06:24:32 +0000 (06:24 +0000)]
Fix up locking problems in fifo_open() and fifo_close():

Sleep on the vnode interlock while waiting for another
caller to increment fi_readers or fi_writers.  Hold the
vnode interlock while incrementing fi_readers or fi_writers
to prevent a wakeup from being missed.

Only access fi_readers and fi_writers while holding the vnode
lock.  Previously fifo_close() decremented their values without
holding a lock.

Move resource deallocation from fifo_close() to fifo_inactive(),
which allows the VOP_CLOSE() call in the error return path in
fifo_open() to be removed.  Fifo_open() was calling VOP_CLOSE()
with the vnode lock held, in violation the current vnode locking
API.  Also the way fifo_close() used vrefcnt() to decide whether
to deallocate resources was bogus according to comments in the
vrefcnt() implementation.

Reviewed by: bde

21 years agoClose files after opening them to avoiding leaking descriptors and memory.
tjr [Sun, 1 Jun 2003 06:15:30 +0000 (06:15 +0000)]
Close files after opening them to avoiding leaking descriptors and memory.

21 years agoRemove the ia64 hackery in threadinit() that was needed to work around
marcel [Sun, 1 Jun 2003 05:57:58 +0000 (05:57 +0000)]
Remove the ia64 hackery in threadinit() that was needed to work around
the lameness of the kstack code. The EPC overhaul de-lame-ified the
kstack code by removing the need for contigmalloc(). We can now
allocate stacks using malloc(). We probably want to make the stacks
swappable as well so that we can make it MI. But that's another story.

21 years agoMFi386: revision 1.199
nyan [Sun, 1 Jun 2003 04:51:07 +0000 (04:51 +0000)]
MFi386: revision 1.199

21 years agoMerged from sys/isa/ppc.c revision 1.40.
nyan [Sun, 1 Jun 2003 04:48:34 +0000 (04:48 +0000)]
Merged from sys/isa/ppc.c revision 1.40.

21 years agoMerged from sys/isa/fd.c revision 1.250.
nyan [Sun, 1 Jun 2003 04:46:30 +0000 (04:46 +0000)]
Merged from sys/isa/fd.c revision 1.250.

21 years agoMerged from sys/dev/sio/sio.c revision 1.399.
nyan [Sun, 1 Jun 2003 04:44:43 +0000 (04:44 +0000)]
Merged from sys/dev/sio/sio.c revision 1.399.