]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoDefine BPFD_LOCK_ASSERT() to assert the BPF descriptor lock.
rwatson [Sun, 29 Feb 2004 15:33:56 +0000 (15:33 +0000)]
Define BPFD_LOCK_ASSERT() to assert the BPF descriptor lock.

Assert the BPF descriptor lock in the MAC calls referencing live
BPF descriptors.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, McAfee Research

20 years agoGrab Giant after MAC processing on outgoing packets being sent via
rwatson [Sun, 29 Feb 2004 15:32:33 +0000 (15:32 +0000)]
Grab Giant after MAC processing on outgoing packets being sent via
BPF.  Grab the BPF descriptor lock before entering MAC since the MAC
Framework references BPF descriptor fields, including the BPF
descriptor label.

Submitted by: sam

20 years agoAdded Xref to env(1).
schweikh [Sun, 29 Feb 2004 13:10:09 +0000 (13:10 +0000)]
Added Xref to env(1).

20 years agoAdd amd64 to universe.
johan [Sun, 29 Feb 2004 13:07:05 +0000 (13:07 +0000)]
Add amd64 to universe.

Approved by: peter

20 years agoFix grammar bogon.
schweikh [Sun, 29 Feb 2004 12:52:21 +0000 (12:52 +0000)]
Fix grammar bogon.

20 years agoMove boottime from <sys/kernel.h> to <sys/time.h> where it belongs.
phk [Sun, 29 Feb 2004 10:55:15 +0000 (10:55 +0000)]
Move boottime from <sys/kernel.h> to <sys/time.h> where it belongs.

20 years agoRemove unused FDNUMTOUNIT() macro
phk [Sun, 29 Feb 2004 10:21:40 +0000 (10:21 +0000)]
Remove unused FDNUMTOUNIT() macro

20 years agoGive DDB a "watchdog" command which disables all watchdogs.
phk [Sun, 29 Feb 2004 09:55:32 +0000 (09:55 +0000)]
Give DDB a "watchdog" command which disables all watchdogs.

20 years agoMake rmuser now also remove ipc resources. Also, fix a few minor
schweikh [Sun, 29 Feb 2004 09:54:15 +0000 (09:54 +0000)]
Make rmuser now also remove ipc resources. Also, fix a few minor
shell style problems (superfluous backslashes at EOL).

PR: 55980
Submitted by: Chris S.J.Peron <maneo@bsdpro.com>
MFC after: 2 weeks

20 years agoRearrange sense_key and sense_data to get alignment right.
sos [Sun, 29 Feb 2004 09:35:29 +0000 (09:35 +0000)]
Rearrange sense_key and sense_data to get alignment right.

Submitted by: Marcel

20 years agoAll three of these drivers abused cv_waitq_empty in the same way by spinning
scottl [Sun, 29 Feb 2004 09:26:01 +0000 (09:26 +0000)]
All three of these drivers abused cv_waitq_empty in the same way by spinning
on it in hopes of making sure that the waitq was empty before going on.
This wasn't needed and probably never would have worked as intended.  Now
that cv_waitq_empty() and friends are gone, the code in these drivers that
spins on it can go away too.  This should unbreak LINT.

Discussed with: kan

20 years agoFixed style bugs in previous commit (.ifndef instead of .if defined(),
bde [Sun, 29 Feb 2004 06:39:11 +0000 (06:39 +0000)]
Fixed style bugs in previous commit (.ifndef instead of .if defined(),
and tab lossage).

Garbage-collected NEED_LIBNAMES.

20 years agoBring to working PIO state.
grehan [Sun, 29 Feb 2004 06:01:16 +0000 (06:01 +0000)]
Bring to working PIO state.
 - use correct rid when allocating PCI mem resource
 - ATA taskfile registers are indeed spaced 0x10 apart just like
 the Macio ATA cell. Adjust offsets in ATA channel struct.

Tested by:  Suleiman Souhlal <ssouhlal@vt.edu>

20 years agoModified release notes: More ports affected by thread-safe resolver
bmah [Sun, 29 Feb 2004 02:20:21 +0000 (02:20 +0000)]
Modified release notes:  More ports affected by thread-safe resolver
ABI change [1], ACPI 20040220.

Submitted by: marcus [1]

20 years agoFurther shuffle runcom ordering so that netif does not start before
green [Sun, 29 Feb 2004 01:42:48 +0000 (01:42 +0000)]
Further shuffle runcom ordering so that netif does not start before
ipfw, but ipfw and ipfilter do start before dhclient.

20 years agouteval.c gained a warning (cast discards qualifiers from pointer target
marcel [Sat, 28 Feb 2004 23:04:45 +0000 (23:04 +0000)]
uteval.c gained a warning (cast discards qualifiers from pointer target
type) after vendor import of ACPICA 20040220. Add nowerror.

20 years agoAdd MLINKs for MALLOC_DEFINE and MALLOC_DECLARE.
le [Sat, 28 Feb 2004 23:01:20 +0000 (23:01 +0000)]
Add MLINKs for MALLOC_DEFINE and MALLOC_DECLARE.

Approved by:     grog (mentor)

20 years agoAdded errata items: SA-04:03, __FreeBSD_version glitch in
bmah [Sat, 28 Feb 2004 22:49:15 +0000 (22:49 +0000)]
Added errata items:  SA-04:03, __FreeBSD_version glitch in
porters-handbook for 5.2.1 docset.

Made this document apply to 5.2.1-RELEASE as well by noting this in
the abstract and noting errata items that were fixed/addressed in
5.2.1.

20 years agoCall _INI on Thermal Zones as well as devices.
njl [Sat, 28 Feb 2004 22:43:18 +0000 (22:43 +0000)]
Call _INI on Thermal Zones as well as devices.

20 years agoAdd support for the watchdog in Geode SC1100 which is used in embedded
phk [Sat, 28 Feb 2004 22:33:28 +0000 (22:33 +0000)]
Add support for the watchdog in Geode SC1100 which is used in embedded
systems like the Soekris NET4801

20 years agoMake sure to disable the watchdog if we cannot honour the timeout.
phk [Sat, 28 Feb 2004 22:01:19 +0000 (22:01 +0000)]
Make sure to disable the watchdog if we cannot honour the timeout.

20 years agoAdd skeleton build dirs for pf userland:
mlaier [Sat, 28 Feb 2004 21:50:50 +0000 (21:50 +0000)]
Add skeleton build dirs for pf userland:
 libexec/ftp-proxy - ftp proxy for pf
 sbin/pfctl - equivalent to sbin/ipf
 sbin/pflogd - deamon logging packets via if_pflog in pcap format
 usr.sbin/authpf - authentification shell to modify pf rulesets

Bring along some altq headers used to satisfy pfctl/authpf compile. This
helps to keep the diff down and will make it easy to have a altq-patchset
use the full powers of pf.

Also make sure that the pf headers are installed.

This does not link anything to the build. There will be a NO_PF switch for
make.conf once pf userland is linked.

Approved by: bms(mentor)

20 years agoo Now when the Cold War is ended we can confess our pppd(8) supports
maxim [Sat, 28 Feb 2004 21:32:40 +0000 (21:32 +0000)]
o Now when the Cold War is ended we can confess our pppd(8) supports
CBCP (Call Back Configuration Protocol).  Document 'callback phone_number'.

Obtained from: NetBSD (pppd/pppd.8, rev. 1.26)
MFC after: 3 weeks

20 years agoRename the WATCHDOG option to SW_WATCHDOG and make it use the
phk [Sat, 28 Feb 2004 20:56:35 +0000 (20:56 +0000)]
Rename the WATCHDOG option to SW_WATCHDOG and make it use the
generic watchdoc(9) interface.

Make watchdogd(8) perform as watchdog(8) as well, and make it
possible to specify a check command to run, timeout and sleep
periods.

Update watchdog(4) to talk about the generic interface and add
new watchdog(8) page.

20 years agoStrip out new, unused file acnetbsd.h
njl [Sat, 28 Feb 2004 20:56:25 +0000 (20:56 +0000)]
Strip out new, unused file acnetbsd.h

20 years agoThis commit was generated by cvs2svn to compensate for changes in r126380,
njl [Sat, 28 Feb 2004 20:42:10 +0000 (20:42 +0000)]
This commit was generated by cvs2svn to compensate for changes in r126380,
which included commits to RCS files with non-trunk default branches.

20 years agoFix an off-by-one in the compiler path. Originally from iwasaki-san's
njl [Sat, 28 Feb 2004 20:42:10 +0000 (20:42 +0000)]
Fix an off-by-one in the compiler path.  Originally from iwasaki-san's
patches for the pmtools port.  This change has been submitted to Intel.

20 years agoLocal change: emulate a ReturnOp if the AML expects one but it isn't
njl [Sat, 28 Feb 2004 20:40:24 +0000 (20:40 +0000)]
Local change:  emulate a ReturnOp if the AML expects one but it isn't
present.  Some buggy BIOSs do not have a ReturnOp even though it is
required for a function to return a value.

20 years agoLocal change: In the resume path, give up after waiting for a while
njl [Sat, 28 Feb 2004 20:39:50 +0000 (20:39 +0000)]
Local change:  In the resume path, give up after waiting for a while
for WAK_STS to be set.  Some BIOSs never set it.

20 years agoLocal change: Allow access to the field if it is within the region
njl [Sat, 28 Feb 2004 20:39:09 +0000 (20:39 +0000)]
Local change:  Allow access to the field if it is within the region
size rounded up to a multiple of the access byte width.  This overcomes
"off-by-one" programming errors in the AML often found in Toshiba
laptops.

20 years agoLocal change: Put various debugging options under ACPI_DISASSEMBLER.
njl [Sat, 28 Feb 2004 20:38:40 +0000 (20:38 +0000)]
Local change:  Put various debugging options under ACPI_DISASSEMBLER.

20 years agoUnchanged files from ACPICA 20040220 that are off the vendor branch.
njl [Sat, 28 Feb 2004 20:35:57 +0000 (20:35 +0000)]
Unchanged files from ACPICA 20040220 that are off the vendor branch.

20 years agoVendor import of ACPICA 20040220
njl [Sat, 28 Feb 2004 20:23:30 +0000 (20:23 +0000)]
Vendor import of ACPICA 20040220

20 years agoThis commit was generated by cvs2svn to compensate for changes in r126372,
njl [Sat, 28 Feb 2004 20:23:30 +0000 (20:23 +0000)]
This commit was generated by cvs2svn to compensate for changes in r126372,
which included commits to RCS files with non-trunk default branches.

20 years agoAdd contents to manualpage for generic watchdog facility.
phk [Sat, 28 Feb 2004 20:08:41 +0000 (20:08 +0000)]
Add contents to manualpage for generic watchdog facility.
Formatting likely to break several UN resolutions.

20 years agoAdd a generic watchdog facility which through a single device entry
phk [Sat, 28 Feb 2004 20:06:59 +0000 (20:06 +0000)]
Add a generic watchdog facility which through a single device entry
in /dev controls all available watchdog implementations.

20 years agoClean all the object files whether or not ACPI_DEBUG is specified.
njl [Sat, 28 Feb 2004 19:51:44 +0000 (19:51 +0000)]
Clean all the object files whether or not ACPI_DEBUG is specified.

20 years agoRemove unneeded {} originally used to hold local variables for dummynet
rwatson [Sat, 28 Feb 2004 19:50:43 +0000 (19:50 +0000)]
Remove unneeded {} originally used to hold local variables for dummynet
in a code block, as the variable is now gone.

Submitted by: sam

20 years agoCreate a new mutex type for virtual channels. This allows us to get
truckman [Sat, 28 Feb 2004 19:47:02 +0000 (19:47 +0000)]
Create a new mutex type for virtual channels.  This allows us to get
rid of the MTX_DUPOK flag on channel mutexes, which allows witness to
do a better job of lock order checking.  Nuke snd_chnmtxcreate() since
it is no longer needed.

Tested by: matk

20 years agoLock channels only as necessary in dsp_ioctl(), and only lock one
truckman [Sat, 28 Feb 2004 19:42:48 +0000 (19:42 +0000)]
Lock channels only as necessary in dsp_ioctl(), and only lock one
channel at a time unless it is actually necessary to lock both.
This avoids problems with lock order reversal and malloc() calls
with a mutex held when lower level code unlocks a channel, calls malloc(),
and relocks the channel.  This also avoids the cost of some  unnecessary
locking and unlocking.

Tested by: matk

20 years agoFix description which seems to have survived intact from more specific code.
phk [Sat, 28 Feb 2004 19:36:48 +0000 (19:36 +0000)]
Fix description which seems to have survived intact from more specific code.

20 years agoSwitch from using mutexes to using semaphores to protect against early
scottl [Sat, 28 Feb 2004 19:14:41 +0000 (19:14 +0000)]
Switch from using mutexes to using semaphores to protect against early
completion of synchronous commands.  Also switch to a per-array bioq as it
appears to improve performance.

Submitted by: mbr, imp.ch (bioq change)

20 years agoAdd entry for udav(4) devices.
bmah [Sat, 28 Feb 2004 18:44:52 +0000 (18:44 +0000)]
Add entry for udav(4) devices.

20 years agoSorting fix: Put resolver(3) and killall(1) in the correct sorting
bmah [Sat, 28 Feb 2004 18:42:03 +0000 (18:42 +0000)]
Sorting fix:  Put resolver(3) and killall(1) in the correct sorting
order in the userland section.

No other content changes.

20 years agoAdd local define of HTONL() as it was decided to protect this by _KERNEL
mlaier [Sat, 28 Feb 2004 18:41:43 +0000 (18:41 +0000)]
Add local define of HTONL() as it was decided to protect this by _KERNEL
in <net/pfvar.h>

20 years agoNew release notes: SA-04:03, device driver megapatch, new file
bmah [Sat, 28 Feb 2004 18:40:53 +0000 (18:40 +0000)]
New release notes:  SA-04:03, device driver megapatch, new file
descriptor allocation code, udav(4), TCP segment reassembly queue
update, EXT2FS large file support, geom_concat, indent(1) -ldi,
ifconfig(8) name, ip6fw(8) -n, libalias(3) new API, newfs(8)/mdmfs(8)
-l, re-entrant resolver(3) interfaces, savecore(8) large coredump
support, script(1) stdin bugfix, getopt_long(3) changes, gdtoa
20040118.

Modified release notes:  Cross-reference resolver(3) rather than
resolver(5).

A number of these release notes were obtained from (or supplemented
by) Mark Johnston's weekly FreeBSD cvs-src summaries.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r126357,
mlaier [Sat, 28 Feb 2004 18:35:40 +0000 (18:35 +0000)]
This commit was generated by cvs2svn to compensate for changes in r126357,
which included commits to RCS files with non-trunk default branches.

20 years agoMissed those two during the original import. Taken from OpenBSD's util.h
mlaier [Sat, 28 Feb 2004 18:35:40 +0000 (18:35 +0000)]
Missed those two during the original import. Taken from OpenBSD's util.h

Approved by: bms(mentor)

20 years agoIssue a request sense command automagically when ATAPI commands fail
sos [Sat, 28 Feb 2004 17:47:27 +0000 (17:47 +0000)]
Issue a request sense command automagically when ATAPI commands fail
with a valid sense key.

20 years agoApply diff from the port.
mlaier [Sat, 28 Feb 2004 17:32:53 +0000 (17:32 +0000)]
Apply diff from the port.
Rather small diff for the userland (in contrast to the kernel):
 - Some header file location/differences
 - Clean compilation on 64bit arch (identified by bento a long time ago)
 - ALTQ not (yet) available. Leave a switch for patchsets and future ...
 - most files can be used from the vendor branch

Approved by: bms(in general)

20 years agoVendor import of OpenBSD's pf userland as of OpenBSD 3.4
mlaier [Sat, 28 Feb 2004 16:52:45 +0000 (16:52 +0000)]
Vendor import of OpenBSD's pf userland as of OpenBSD 3.4

Approved by: bms(mentor), core(in general)

20 years agoThis commit was generated by cvs2svn to compensate for changes in r126353,
mlaier [Sat, 28 Feb 2004 16:52:45 +0000 (16:52 +0000)]
This commit was generated by cvs2svn to compensate for changes in r126353,
which included commits to RCS files with non-trunk default branches.

20 years agoPrevious commit mistakenly delayed cnadd() as well as make_dev().
kensmith [Sat, 28 Feb 2004 16:36:14 +0000 (16:36 +0000)]
Previous commit mistakenly delayed cnadd() as well as make_dev().
Testing on cluster ref machine with just delaying make_dev() seems
to work, and results in printf() output appearing sooner in boot
cycle instead of going to /dev/null.

Caught by: bde
Pointy hat: kensmith
Approved by: rwatson (mentor)

20 years agoRemove now unneeded arguments to tcp_twrespond() -- so and msrc. These
rwatson [Sat, 28 Feb 2004 15:12:20 +0000 (15:12 +0000)]
Remove now unneeded arguments to tcp_twrespond() -- so and msrc.  These
were needed by the MAC Framework until inpcbs gained labels.

Submitted by: sam

20 years agoConnect udav.4 to the build and add MLINK to if_udav.4
brueffer [Sat, 28 Feb 2004 13:39:58 +0000 (13:39 +0000)]
Connect udav.4 to the build and add MLINK to if_udav.4

20 years agoAdd support for /dev/led/error on Soekris Net4801.
phk [Sat, 28 Feb 2004 13:15:53 +0000 (13:15 +0000)]
Add support for /dev/led/error on Soekris Net4801.

20 years agoCompare the *number* of patterns to zero, not the *pointer* to the
cperciva [Sat, 28 Feb 2004 12:59:56 +0000 (12:59 +0000)]
Compare the *number* of patterns to zero, not the *pointer* to the
patterns.  (These lines are correct the other two times they appear.)

Reported by: "Ted Unangst" <tedu@coverity.com>
Approved by: rwatson (mentor), ken (scsi)

20 years agoo Remove obsoleted '-N' and '-d' flags.
maxim [Sat, 28 Feb 2004 10:42:27 +0000 (10:42 +0000)]
o Remove obsoleted '-N' and '-d' flags.

20 years agoo Sync usage() with reality: add 'z' flag.
maxim [Sat, 28 Feb 2004 10:22:17 +0000 (10:22 +0000)]
o Sync usage() with reality: add 'z' flag.

MFC after: 1 week

20 years agoIn the case of a background fsck, periodically update the process title
scottl [Sat, 28 Feb 2004 07:50:42 +0000 (07:50 +0000)]
In the case of a background fsck, periodically update the process title
with a progress update.

20 years agoAdd getopt_long.c if ${BOOTSTRAPPING} < 502104
ache [Sat, 28 Feb 2004 07:25:48 +0000 (07:25 +0000)]
Add getopt_long.c if ${BOOTSTRAPPING} < 502104

20 years agoUse system getopt_long*
ache [Sat, 28 Feb 2004 05:38:45 +0000 (05:38 +0000)]
Use system getopt_long*

20 years agoDon't remove empty dirs if their names are in $daily_clean_tmps_ignore
ache [Sat, 28 Feb 2004 04:58:40 +0000 (04:58 +0000)]
Don't remove empty dirs if their names are in $daily_clean_tmps_ignore

20 years agoAdd udav(4)
brueffer [Sat, 28 Feb 2004 02:55:12 +0000 (02:55 +0000)]
Add udav(4)

20 years agocue(4) doesn't use miibus(4)
brueffer [Sat, 28 Feb 2004 02:51:21 +0000 (02:51 +0000)]
cue(4) doesn't use miibus(4)

MFC after: 3 days

20 years agoRemove reference to miibus.4, cue(4) does not use it.
brueffer [Sat, 28 Feb 2004 02:49:20 +0000 (02:49 +0000)]
Remove reference to miibus.4, cue(4) does not use it.

MFC after: 3 days

20 years agoAdd manpage for udav(4)
brueffer [Sat, 28 Feb 2004 02:29:59 +0000 (02:29 +0000)]
Add manpage for udav(4)

Obtained from: NetBSD

20 years agoAdding Vinod Kashyap (vkashyap) as the maintainer for twe.
vkashyap [Sat, 28 Feb 2004 00:48:20 +0000 (00:48 +0000)]
Adding Vinod Kashyap (vkashyap) as the maintainer for twe.

20 years agoSync to 1.163 of usbdevs
sanpei [Sat, 28 Feb 2004 00:15:08 +0000 (00:15 +0000)]
Sync to 1.163 of usbdevs

20 years agoadd support DM9601(DAVICOM USB to Ethernet MAC Controller with Integrated 10/100...
sanpei [Sat, 28 Feb 2004 00:12:47 +0000 (00:12 +0000)]
add support DM9601(DAVICOM USB to Ethernet MAC Controller with Integrated 10/100 PHY)
- Corega FEther USB-TXC

PR: kern/62932
Submitted by: HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
Obtained from: NetBSD

20 years agoWhat depends on ipfilter should probably also start ipfw at the same time.
green [Fri, 27 Feb 2004 22:08:19 +0000 (22:08 +0000)]
What depends on ipfilter should probably also start ipfw at the same time.

20 years agoMove the code dealing with vnode out of several functions into a single
kan [Fri, 27 Feb 2004 22:02:15 +0000 (22:02 +0000)]
Move the code dealing with vnode out of several functions into a single
helper function vm_mmap_vnode.

Discussed with: jeffr,alc (a while ago)

20 years agoUpdate the find manual page:
trhodes [Fri, 27 Feb 2004 20:04:38 +0000 (20:04 +0000)]
Update the find manual page:

1: Document -follow under COMPATIBILITY.
2: Update an example to be a little more 'safe'.
3: Use '/' in place of '.' for an example; similar to other manual pages.

PR: 40196 (1), 39532 (2, 3)
Submitted by: Marc Silver <marcs@draenor.org> (2 and 3)
Discussed with: des (1)

20 years agoNFSv4 fixes from Connectathon 2004:
rees [Fri, 27 Feb 2004 19:37:43 +0000 (19:37 +0000)]
NFSv4 fixes from Connectathon 2004:

remove unused pid field of file context struct
map nfs4 error codes to errnos
eliminate redundant code from nfs4_request
use zero stateid on setattr that doesn't set file size
use same clientid on all mounts until reboot
invalidate dirty bufs in nfs4_close, to play it safe
open file for writing if truncating and it's not already open

Approved by: alfred

20 years agoFix -current builds on alpha. Recent changes in device handling caused
kensmith [Fri, 27 Feb 2004 19:30:46 +0000 (19:30 +0000)]
Fix -current builds on alpha.  Recent changes in device handling caused
subtle problems with how alpha was handling the promcons device.  This
moves the call to make_dev() for the promcons device to a later point of
the boot-up sequence than where promcons initially gets attached, make_dev()
called during the first attach crashes due to kernel stack issues.

Reviewed by: gallatin, marcel, phk
Discussed on: -current@, -alpha@
Approved by: rwatson (mentor)

20 years agoWANT_EXT2FS_MODULE was removed from sys/modules/Makefile in rev 1.366.
johan [Fri, 27 Feb 2004 19:22:46 +0000 (19:22 +0000)]
WANT_EXT2FS_MODULE was removed from sys/modules/Makefile in rev 1.366.
Hence, remove it here as well.

20 years agoI am a moron.
des [Fri, 27 Feb 2004 19:00:41 +0000 (19:00 +0000)]
I am a moron.

20 years agoSwitch the sleep/wakeup and condition variable implementations to use the
jhb [Fri, 27 Feb 2004 18:52:44 +0000 (18:52 +0000)]
Switch the sleep/wakeup and condition variable implementations to use the
sleep queue interface:
- Sleep queues attempt to merge some of the benefits of both sleep queues
  and condition variables.  Having sleep qeueus in a hash table avoids
  having to allocate a queue head for each wait channel.  Thus, struct cv
  has shrunk down to just a single char * pointer now.  However, the
  hash table does not hold threads directly, but queue heads.  This means
  that once you have located a queue in the hash bucket, you no longer have
  to walk the rest of the hash chain looking for threads.  Instead, you have
  a list of all the threads sleeping on that wait channel.
- Outside of the sleepq code and the sleep/cv code the kernel no longer
  differentiates between cv's and sleep/wakeup.  For example, calls to
  abortsleep() and cv_abort() are replaced with a call to sleepq_abort().
  Thus, the TDF_CVWAITQ flag is removed.  Also, calls to unsleep() and
  cv_waitq_remove() have been replaced with calls to sleepq_remove().
- The sched_sleep() function no longer accepts a priority argument as
  sleep's no longer inherently bump the priority.  Instead, this is soley
  a propery of msleep() which explicitly calls sched_prio() before
  blocking.
- The TDF_ONSLEEPQ flag has been dropped as it was never used.  The
  associated TDF_SET_ONSLEEPQ and TDF_CLR_ON_SLEEPQ macros have also been
  dropped and replaced with a single explicit clearing of td_wchan.
  TD_SET_ONSLEEPQ() would really have only made sense if it had taken
  the wait channel and message as arguments anyway.  Now that that only
  happens in one place, a macro would be overkill.

20 years agoDrop sched_lock around the wakeup of the parent process after setting
jhb [Fri, 27 Feb 2004 18:39:09 +0000 (18:39 +0000)]
Drop sched_lock around the wakeup of the parent process after setting
the process state to zombie when a process exits to avoid a lock order
reversal with the sleepqueue locks.  This appears to be the only place
that we call wakeup() with sched_lock held.

20 years agoAdd an implementation of a generic sleep queue abstraction that is used
jhb [Fri, 27 Feb 2004 18:33:09 +0000 (18:33 +0000)]
Add an implementation of a generic sleep queue abstraction that is used
to queue threads sleeping on a wait channel similar to how turnstiles are
used to queue threads waiting for a lock.  This subsystem will be used as
the backend for sleep/wakeup and condition variables initially.  Eventually
it will also be used to replace the ithread-specific iwait thread
inhibitor.

Sleep queues are also not locked by sched_lock, so this splits sched_lock
up a bit further increasing concurrency within the scheduler.  Sleep queues
also natively support timeouts on sleeps and interruptible sleeps allowing
for the reduction of a lot of duplicated code between the sleep/wakeup and
condition variable implementations.  For more details on the sleep queue
implementation, check the comments in sys/sleepqueue.h and
kern/subr_sleepqueue.c.

20 years agoRe-add the setuid bit, conditional on NO_SETUID_LOGIN being undefined.
des [Fri, 27 Feb 2004 17:50:59 +0000 (17:50 +0000)]
Re-add the setuid bit, conditional on NO_SETUID_LOGIN being undefined.

20 years agomtod() returns pointer to the specified type, not necessarily "void *".
ru [Fri, 27 Feb 2004 17:14:00 +0000 (17:14 +0000)]
mtod() returns pointer to the specified type, not necessarily "void *".

20 years agoDocument sysctl_move_oid().
des [Fri, 27 Feb 2004 17:13:42 +0000 (17:13 +0000)]
Document sysctl_move_oid().

20 years agoAdd sysctl_move_oid() which reparents an existing OID.
des [Fri, 27 Feb 2004 17:13:23 +0000 (17:13 +0000)]
Add sysctl_move_oid() which reparents an existing OID.

20 years agoFix a few style nits. do { } while(0) are only used for compound
jhb [Fri, 27 Feb 2004 16:25:05 +0000 (16:25 +0000)]
Fix a few style nits.  do { } while(0) are only used for compound
statements and nowhere else in the kernel seems to use them for single
statements.  Also, all other users of do { } while(0) use multiple lines
rather than cramming it all onto one line.

20 years agoClarify and tweak some comments.
jhb [Fri, 27 Feb 2004 16:14:27 +0000 (16:14 +0000)]
Clarify and tweak some comments.

20 years agoFix _sx_assert() to panic() rather than printf() when an assertion fails
jhb [Fri, 27 Feb 2004 16:13:44 +0000 (16:13 +0000)]
Fix _sx_assert() to panic() rather than printf() when an assertion fails
and ignore assertions if we have already paniced.

20 years agoEven if we're sure that we can't be orphaned here, we have to define
pjd [Fri, 27 Feb 2004 15:34:21 +0000 (15:34 +0000)]
Even if we're sure that we can't be orphaned here, we have to define
orphan field - we're enforcing it in GEOM. This will reach KASSERT
in INVARIANTS case.

Add missing space.

Approved by: scottl (mentor)

20 years agoRemove unused field.
pjd [Fri, 27 Feb 2004 15:32:49 +0000 (15:32 +0000)]
Remove unused field.

Approved by: scottl (mentor)

20 years agoMake consistent with the better written wcsrtombs function:
dds [Fri, 27 Feb 2004 15:03:22 +0000 (15:03 +0000)]
Make consistent with the better written wcsrtombs function:
- Fix syntax
- Remove the (slightly wrong) duplicate explanation of the error condition
- Change reference to invalid multibyte character into invalid wide character

20 years agoFor some reason crt0.o needs to be linked first for pxeboot(8) to
ru [Fri, 27 Feb 2004 14:10:09 +0000 (14:10 +0000)]
For some reason crt0.o needs to be linked first for pxeboot(8) to
work.  This is odd because loader(8) doesn't suffer from this problem.
Perhaps pxeboot bootstrap can be fixed to handle this better.
Anyway, PXE booting should work again.

20 years agoo Add support for detecting a jailed environment. If a script
mtm [Fri, 27 Feb 2004 10:44:33 +0000 (10:44 +0000)]
o Add support for detecting a jailed environment. If a script
  cannot or does not want to be executed in a jail the
  KEYWORDS line should contain the nojail keyword.
o Update Copyright

# I suggest people who use jails more extensively than I do
# make commits to the appropriate files.

20 years agoRemove EXAMPLES section which duplicates text in fetch(3).
des [Fri, 27 Feb 2004 10:27:01 +0000 (10:27 +0000)]
Remove EXAMPLES section which duplicates text in fetch(3).

20 years agoNetBSD rev. 1.10
mtm [Fri, 27 Feb 2004 10:20:22 +0000 (10:20 +0000)]
NetBSD rev. 1.10
 successful [is spelled] with only one l

NetBSD rev. 1.12
 Implement ``one'' prefix to allow a "one shot" operation as if
 ${rcvar}=yes yet all the other prerequisite tests are still performed.
 The existing ``force'' prefix is a sledgehammer that ignores all the
 prerequisite checks and always returns a zero exit status; this is a
 more gentle approach to the problem of "manipulate this disabled
 service without editing rc.conf(5)".

Obtained From: NetBSD

20 years agoNetBSD rev. 1.61
mtm [Fri, 27 Feb 2004 09:58:50 +0000 (09:58 +0000)]
NetBSD rev. 1.61
  Implement ``one'' prefix to allow a "one shot" operation as if
  ${rcvar}=yes yet all the other prerequisite tests are still performed.
  The existing ``force'' prefix is a sledgehammer that ignores all the
  prerequisite checks and always returns a zero exit status; this is a
  more gentle approach to the problem of "manipulate this disabled
  service without editing rc.conf(5)".

Obtained From: NetBSD

# We have a work-around in our version of rc.subr that
# makes force* return a non-zero exit status if the
# command/service could not be acted upon. The work-around
# is no longer necessary and should be removed.

20 years agoCut through the bikeshed and remove login(1)'s setuid bit. It has no
des [Fri, 27 Feb 2004 08:39:16 +0000 (08:39 +0000)]
Cut through the bikeshed and remove login(1)'s setuid bit.  It has no
business trying to impersonate su(1), and it does not need to be setuid
to function properly when invoked by getty(8) or telnetd(8).

20 years agoLook for both name and if_<name> strings in module metadata. Pseudo-devices
kan [Fri, 27 Feb 2004 06:43:14 +0000 (06:43 +0000)]
Look for both name and if_<name> strings in module metadata. Pseudo-devices
like tun are naming their modules using the 'if_; prefix and previous version of
the code failed to detect their presence in the kernel, resulting in the same
module being loaded twice.

20 years agoAdd the clean_environment call to libutil.h also.
kientzle [Thu, 26 Feb 2004 22:44:11 +0000 (22:44 +0000)]
Add the clean_environment call to libutil.h also.

MFC after: 2 weeks

20 years agoAdd a clean_environment call to libutil.
kientzle [Thu, 26 Feb 2004 22:41:47 +0000 (22:41 +0000)]
Add a clean_environment call to libutil.

This function removes all environment variables except
the ones listed on a "whitelist."

The function accepts two whitelist arguments.
If the first is NULL, a built-in default list will be
used.  This allows callers to get a variety of behaviors:
  * Default screening: provide NULL for both lists
  * Custom screening: provide a custom list for the first argument
  * Modified default screening: provide NULL for first arg,
     list of additional variables to preserve in the second arg

Idea from: Jacques Vidrine

MFC after: 2 weeks

20 years agoAdd extra sanity check for SDP packets in libsdp(3)
emax [Thu, 26 Feb 2004 20:44:55 +0000 (20:44 +0000)]
Add extra sanity check for SDP packets in libsdp(3)
Fix yet another endianess bug in sdpd(8)