]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agomake it work after the api change
sam [Sat, 5 Aug 2006 18:21:04 +0000 (18:21 +0000)]
make it work after the api change

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoSince soisdisconnected() is no longer called in pru_detach(), call it
rwatson [Sat, 5 Aug 2006 14:14:34 +0000 (14:14 +0000)]
Since soisdisconnected() is no longer called in pru_detach(), call it
near consumers of at_pcbdisconnect() (_close, _abort).

17 years agoUse the SLIST_NEXT macro instead of sle_next.
stefanf [Sat, 5 Aug 2006 13:58:50 +0000 (13:58 +0000)]
Use the SLIST_NEXT macro instead of sle_next.

Checked with: cmp(1)

17 years agoDo not pass-through the tailing newline character from the ctime(3)
rse [Sat, 5 Aug 2006 12:50:38 +0000 (12:50 +0000)]
Do not pass-through the tailing newline character from the ctime(3)
output to setproctitle(3) in order to get rid of the ugly two-character
escape sequence "\n" in the ps(1) output of a dump(8) process:

<< [...] finished in 0:00 at Sat Aug  5 14:44:39 2006\n (dump)
>> [...] finished in 0:00 at Sat Aug  5 14:44:39 2006 (dump)

17 years agoUnbreak nForce3 SATA support.
sos [Sat, 5 Aug 2006 11:41:46 +0000 (11:41 +0000)]
Unbreak nForce3 SATA support.

17 years agohook packet injection tools up
sam [Sat, 5 Aug 2006 05:20:40 +0000 (05:20 +0000)]
hook packet injection tools up

17 years agotest programs for 802.11 packet injection
sam [Sat, 5 Aug 2006 05:18:03 +0000 (05:18 +0000)]
test programs for 802.11 packet injection

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years ago802.11 packet injection test tool
sam [Sat, 5 Aug 2006 05:13:31 +0000 (05:13 +0000)]
802.11 packet injection test tool

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agocrude stumbler using raw packet api's
sam [Sat, 5 Aug 2006 05:12:03 +0000 (05:12 +0000)]
crude stumbler using raw packet api's

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoraw tx stat
sam [Sat, 5 Aug 2006 05:09:20 +0000 (05:09 +0000)]
raw tx stat

17 years agoraw 802.11 packet transmit support
sam [Sat, 5 Aug 2006 05:07:17 +0000 (05:07 +0000)]
raw 802.11 packet transmit support

Joint work with: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoraw 802.11 packet transmit support
sam [Sat, 5 Aug 2006 04:58:25 +0000 (04:58 +0000)]
raw 802.11 packet transmit support

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoRemove reference to PTI cards. They haven't been functioning
mjacob [Sat, 5 Aug 2006 04:21:20 +0000 (04:21 +0000)]
Remove reference to PTI cards. They haven't been functioning
or around for probably at least 5 years.

17 years agoAdd OpenSolaris compatibility definitions for stat64 and fstat64 which
jb [Fri, 4 Aug 2006 23:47:30 +0000 (23:47 +0000)]
Add OpenSolaris compatibility definitions for stat64 and fstat64 which
are only visible if _SOLARIS_C_SOURCE is defined.

Note thar FreeBSD stat() and fstat() are 64-bit functions now and Solaris
still persists with both 32- and 64-bit versions. When I query this, I am
referred to: <http://www.unix.org/version2/whatsnew/lfs20mar.html>.
But when you look at the main page of unix.org you will see that the
Single Unix Specification <http://www.unix.org/version3/> is the most
recent standard they are pushing. And there are no stat64() fstat64()
functions defined there. I guess this just goes to prove that there are so
many standards, you can take your pick.

17 years agoAdd a type definition for the cyclic timer callback function.
jb [Fri, 4 Aug 2006 23:31:16 +0000 (23:31 +0000)]
Add a type definition for the cyclic timer callback function.

The cyclic timer is a high-resolution timer allows timeouts at nanosecond
intervals where hardware support is available. Typically on i386 there
is no HPET (high performance event timer) like the one Intel started
specifying some time in 2004, so the best that tye cyclic timer subsystem
can do is run at Hz.

The cyclic timer code itself is ported from OpenSolaris and is covered
by the CDDL, so it is only loaded as a module. This function type definition
is used in machine-dependent code to provide a hook for the module to
register it's callback function.

17 years agoAdd some OpenSolaris compatibility definitions which are only visible
jb [Fri, 4 Aug 2006 23:10:11 +0000 (23:10 +0000)]
Add some OpenSolaris compatibility definitions which are only visible
if _SOLARIS_C_SOURCE is defined.

Add two function prototypes which are required to feed high-resolution
times to DTrace. DTrace requires it's own functions with the dtrace_
prefix so that it knows not to try and trace them. This is a rule that
code executed from the DTrace probe context must obey.

The two functions are only be compiled if the KDTRACE option is defined
to compile in kernel support for loading the DTrace modules.

17 years agoAdd some compatibility definitions for OpenSolaris source.
jb [Fri, 4 Aug 2006 22:54:10 +0000 (22:54 +0000)]
Add some compatibility definitions for OpenSolaris source.

These are only defined if _SOLARIS_C_SOURCE is defined, so they don't
polute the FreeBSD compile environment.

They are used all over the OpenSolaris source, so defining them here
removes the need to continually resolve differences in FreeBSD system
haeder files from Solaris header files.

17 years agoFix for architectures where sizeof(void *) > sizeof(int).
jb [Fri, 4 Aug 2006 21:45:08 +0000 (21:45 +0000)]
Fix for architectures where sizeof(void *) > sizeof(int).

17 years agoBuild shared on PowerPC now that the bug has been found and fixed.
marcel [Fri, 4 Aug 2006 21:29:39 +0000 (21:29 +0000)]
Build shared on PowerPC now that the bug has been found and fixed.

17 years agoThe KAME compatability shims in net_osdep.h have been removed.
brooks [Fri, 4 Aug 2006 21:29:22 +0000 (21:29 +0000)]
The KAME compatability shims in net_osdep.h have been removed.

17 years agoFix (static) buffer overflow bug. The dest buffer is of size MAXPATHLEN,
marcel [Fri, 4 Aug 2006 21:28:42 +0000 (21:28 +0000)]
Fix (static) buffer overflow bug. The dest buffer is of size MAXPATHLEN,
so dest[MAXPATHLEN] falls outside the buffer.  This bug corrupted
arenas[0] defined in libc's malloc.c on PowerPC when kldxref is shared,
which triggered a delayed SIGSERV.

17 years agoWith exception of the if_name() macro, all definitions in net_osdep.h
brooks [Fri, 4 Aug 2006 21:27:40 +0000 (21:27 +0000)]
With exception of the if_name() macro, all definitions in net_osdep.h
were unused or already in if_var.h so add if_name() to if_var.h and
remove net_osdep.h along with all references to it.

Longer term we may want to kill off if_name() entierly since all modern
BSDs have if_xname variables rendering it unnecessicary.

17 years agoUse TAILQ_EMPTY instead of checking if TAILQ_FIRST is NULL.
brooks [Fri, 4 Aug 2006 21:15:09 +0000 (21:15 +0000)]
Use TAILQ_EMPTY instead of checking if TAILQ_FIRST is NULL.

17 years agoIncrease local reserved (high && low) storage in each command
mjacob [Fri, 4 Aug 2006 20:20:55 +0000 (20:20 +0000)]
Increase local reserved (high && low) storage in each command
structure from 2 to 3 words.

17 years agoFix na_fcentry_t to not have a lun field. Fix indentation in handly
mjacob [Fri, 4 Aug 2006 20:20:00 +0000 (20:20 +0000)]
Fix na_fcentry_t to not have a lun field. Fix indentation in handly
the notify structs. Fix messages in isp_got_msg_fc to print out the
loop id of the sender- not the wwpn which will be synthesized later,
if possible, in the outer layers. Put in debug printouts to pair
a notify ack to a notify so one can see the start/close of an
immediate notify event. Put in spsace for TASK MANAGEMENT response
flags (which we don't do yet).

17 years agoInitialize 2300 request/response pointers in isp_reset- not in
mjacob [Fri, 4 Aug 2006 20:14:52 +0000 (20:14 +0000)]
Initialize 2300 request/response pointers in isp_reset- not in
isp_fibre_init.

17 years agoRename ioctl driven task management functions so they
mjacob [Fri, 4 Aug 2006 20:14:03 +0000 (20:14 +0000)]
Rename ioctl driven task management functions so they
don't collide with task management definitions on other
platforms.

17 years agoForgot to add mountlate to the Makefile.
des [Fri, 4 Aug 2006 18:37:03 +0000 (18:37 +0000)]
Forgot to add mountlate to the Makefile.

17 years agoBy default "autosrc" is off.
glebius [Fri, 4 Aug 2006 18:28:57 +0000 (18:28 +0000)]
By default "autosrc" is off.

Submitted by: ru

17 years agoCopy the link-layer address from our ifnet pointer at reset time
gallatin [Fri, 4 Aug 2006 17:58:40 +0000 (17:58 +0000)]
Copy the link-layer address from our ifnet pointer at reset time
so that the mac address can be overridden.

17 years agoBuild libthread_db on PowerPC.
marcel [Fri, 4 Aug 2006 17:56:31 +0000 (17:56 +0000)]
Build libthread_db on PowerPC.

17 years agoAdd stub functions. This allows libthread_db to be built and installed,
marcel [Fri, 4 Aug 2006 17:55:55 +0000 (17:55 +0000)]
Add stub functions. This allows libthread_db to be built and installed,
which means that we also have <thread_db.h>.

17 years agoDont overwrite cpu_model in the case of Via's C3-CPU.
mr [Fri, 4 Aug 2006 13:49:16 +0000 (13:49 +0000)]
Dont overwrite cpu_model in the case of Via's C3-CPU.

Noticed by:  Mike Tancsa
MFC after: 2 days

17 years agoIn symlook_obj(): fix _rtld_error output.
delphij [Fri, 4 Aug 2006 13:37:54 +0000 (13:37 +0000)]
In symlook_obj(): fix _rtld_error output.

MFC After: 2 weeks

17 years agoTurn off by default "feature" that overwrites MAC address
glebius [Fri, 4 Aug 2006 13:36:27 +0000 (13:36 +0000)]
Turn off by default "feature" that overwrites MAC address
on output frames.

Many people were confused with not working CARP, ng_bridge(4)
and other subsystems, because ng_ether(4) overwritten source
MAC address.

17 years agoCheck if the filedes of kevent is expected one. Though our
ume [Fri, 4 Aug 2006 12:26:07 +0000 (12:26 +0000)]
Check if the filedes of kevent is expected one.  Though our
old resolver opened just one socket, BIND9's resolver may
open more than one sockets.  And, BIND9's resolver doesn't
close the socket on timeout.  So, we need this check.

Reported by: freebsd-cvs-src__at__oldach.net (Helge Oldach), bz
Hinted by: rwatson

17 years agoRemove useless NULL pointer check: we are using M_WAITOK flag for memory
oleg [Fri, 4 Aug 2006 10:50:51 +0000 (10:50 +0000)]
Remove useless NULL pointer check: we are using M_WAITOK flag for memory
allocation.

Submitted by: Andrey Elsukov <bu7cher at yandex dot ru>
Approved by: glebius (mentor)
MFC after: 1 week

17 years ago_close() should be called instead of close() here.
ume [Fri, 4 Aug 2006 10:21:11 +0000 (10:21 +0000)]
_close() should be called instead of close() here.

17 years agoCommit the results of the typo hunt by Darren Pilgrim.
yar [Fri, 4 Aug 2006 07:56:35 +0000 (07:56 +0000)]
Commit the results of the typo hunt by Darren Pilgrim.
This change affects documentation and comments only,
no real code involved.

PR: misc/101245
Submitted by: Darren Pilgrim <darren pilgrim bitfreak org>
Tested by: md5(1)
MFC after: 1 week

17 years agoUse floating point instead of hacking something together. Suggested by
njl [Fri, 4 Aug 2006 07:31:55 +0000 (07:31 +0000)]
Use floating point instead of hacking something together.  Suggested by
bde@.  Fix nearby int conversion and a couple style bugs.

MFC after: 1 day

17 years agoImprove quoting of the S1-S5 states. Suggested by yar@.
njl [Fri, 4 Aug 2006 07:19:01 +0000 (07:19 +0000)]
Improve quoting of the S1-S5 states.  Suggested by yar@.
Add a workaround for conflicts between ACPI Cx CPU idling and LAPIC timer.

MFC after: 1 day

17 years agoThe page queues lock is no longer required by vm_page_io_start(). Reduce
alc [Fri, 4 Aug 2006 05:53:20 +0000 (05:53 +0000)]
The page queues lock is no longer required by vm_page_io_start().  Reduce
the scope of the page queues lock in kern_sendfile() accordingly.

17 years agoWhen sleeping on a busy page, use the lock from the containing object
alc [Thu, 3 Aug 2006 23:56:11 +0000 (23:56 +0000)]
When sleeping on a busy page, use the lock from the containing object
rather than the global page queues lock.

17 years agoUse proper trap code for the EXC_ALI traps. This fixes SIGBUS during
sobomax [Thu, 3 Aug 2006 22:44:46 +0000 (22:44 +0000)]
Use proper trap code for the EXC_ALI traps. This fixes SIGBUS during
unaligned 64-bits load/stores.

MFC after: 2 weeks

17 years agoReport the correct function name in a DPRINTF.
jb [Thu, 3 Aug 2006 21:19:13 +0000 (21:19 +0000)]
Report the correct function name in a DPRINTF.

17 years agoUpdate document date.
bms [Thu, 3 Aug 2006 20:43:51 +0000 (20:43 +0000)]
Update document date.

Noticed by: ru

17 years agoRevert back changes to made in rev 1.109 of if_em.c which were unnecessary.
pdeuskar [Thu, 3 Aug 2006 19:05:04 +0000 (19:05 +0000)]
Revert back changes to made in rev 1.109 of if_em.c which were unnecessary.
This makes it easier for us to get the changes into -current and to -stable quickly.

17 years ago- Fix ncp_poll() to not panic if the socket doesn't have any pending data.
jhb [Thu, 3 Aug 2006 15:31:52 +0000 (15:31 +0000)]
- Fix ncp_poll() to not panic if the socket doesn't have any pending data.
  We have to adjust curthread's state enough so that it appears to be
  in a poll(2) or select(2) call so that selrecord() will work and then
  teardown that state after calling sopoll().
- Fix some minor nits in nearby ncp_sock_rselect() and in the identical
  nbssn_rselect() function in the netsmb code:
  - Don't call nb_poll()/ncp_poll() now that ncp_poll() already fakes up
    poll(2) state since the rselect() functions already do that.  Just
    invoke sopoll() directly.
  - To make things slightly more intuitive, store the results of sopoll()
    in a new 'revents' variable rather than 'error' since that's what
    sopoll() actually returns.
  - If the requested timeout time has been exceeded by the time we get
    ready to block, then return EWOULDBLOCK rather than 0 to signal a
    timeout as this is what the calling code expects.

Tested by: Eric Christeson <eric.j.christeson AT gmail> (1)
MFC after: 1 week

17 years agoShould vlan_input() ever be called with ifp pointing to a non-Ethernet
yar [Thu, 3 Aug 2006 09:59:08 +0000 (09:59 +0000)]
Should vlan_input() ever be called with ifp pointing to a non-Ethernet
interface, do not just assign -1 to tag because it breaks the logic of
the code to follow.  The better way is to handle this case as an unsupported
protocol and return unless INVARIANTS is in effect and we can panic.
Panic is good there because the scenario can happen only because of a
coding error elsewhere.

We also should show the interface name in the panic message for easier
debugging of the problem, should it ever emerge.

Submitted by: qingli (initially)

17 years agoBack out rev. 1.107 because it introduced as many problems
yar [Thu, 3 Aug 2006 09:50:15 +0000 (09:50 +0000)]
Back out rev. 1.107 because it introduced as many problems
as it tried to solve:

- it smuggled hidden 802.1q details into otherwise protocol-neutral code;
- it put an important code consistency check under DEBUG, which was never
  defined by anyone but a developer hacking this file for the moment;
- lastly, the former bcopy() call had been correct as long as the "dead"
  code was there.

(A new version of the fix for tag of -1 to come in the next commit.)

Agreed by: qingli

17 years agoMerge in new driver from Intel, version 6.0.5. It adds support for
glebius [Thu, 3 Aug 2006 09:20:11 +0000 (09:20 +0000)]
Merge in new driver from Intel, version 6.0.5. It adds support for
80003 NICs and NICs found on ICH8 mobos, and improves support for
already known chips.

Details:
  - if_em.c. Merged manually, viewing diff between new vendor
    driver and previous one. This was an easy task, because
    most changes between 5.1.5 and 6.0.5 are bugfixes taken
    from FreeBSD.
  - if_em_hw.h. Dropped in from vendor, and then restored
    revisions 1.16, 1.17, 1.18.
  - if_em_hw.c. Dropped in from vendor, and then restored
    revision 1.15.
  - if_em_osdep.h. Added new required macros from vendor file
    and add a hack against define namespace mangling in
    if_em_hw.h. Intel made another hack, but I prefer mine.

17 years agoAdd the DTrace library script directory.
jb [Thu, 3 Aug 2006 05:46:32 +0000 (05:46 +0000)]
Add the DTrace library script directory.

17 years agoNot allowed to use tabs. The rule that proves the rule. Heh.
jb [Thu, 3 Aug 2006 05:44:51 +0000 (05:44 +0000)]
Not allowed to use tabs. The rule that proves the rule. Heh.

17 years agoRegen.
jb [Thu, 3 Aug 2006 05:32:43 +0000 (05:32 +0000)]
Regen.

Note the addition of the extra file now generated.

17 years agoRegen.
jb [Thu, 3 Aug 2006 05:31:28 +0000 (05:31 +0000)]
Regen.

17 years agoGenerate another file called systrace_args.c. This will be compiled
jb [Thu, 3 Aug 2006 05:29:09 +0000 (05:29 +0000)]
Generate another file called systrace_args.c. This will be compiled
into systrace and is used to map the syscall arguments into the 64-bit
parameter array.

17 years agoAdd fields to struct sysent to support the DTrace syscall provider called
jb [Thu, 3 Aug 2006 05:26:51 +0000 (05:26 +0000)]
Add fields to struct sysent to support the DTrace syscall provider called
systrace.

Another file called systrace_args.c is generated. This will be compiled
into systrace and is used to map the syscall arguments into the 64-bit
parameter array.

17 years agoAdd an option to enable KSE support.
jb [Thu, 3 Aug 2006 05:19:33 +0000 (05:19 +0000)]
Add an option to enable KSE support.

Add an option to build in kernel DTrace hooks. Without this option, the
DTrace modules acn't be loaded.

17 years agoWhen the volume is being downgraded from a read-write mode, mark
delphij [Thu, 3 Aug 2006 03:55:52 +0000 (03:55 +0000)]
When the volume is being downgraded from a read-write mode, mark
it as clean.

PR: kern/85366
Submitted by: Dan Lukes <dan at obluda dot cz>
MFC After: 2 weeks

17 years agoIn DCE 1.1, the time_low value is defined as an unsigned 32-bit
delphij [Thu, 3 Aug 2006 03:34:36 +0000 (03:34 +0000)]
In DCE 1.1, the time_low value is defined as an unsigned 32-bit
integer.  Presently, our implementation employs an approach that
converts the value to int64_t, then back to int, unfortunately,
this approach can be problematic when the the difference between
the two time_low is larger than 0x7fffffff, as the value is then
truncated to int.

To quote the test case from the original PR, the following is
true with the current implementation:

865e1a56-b9d9-11d9-ba27-0003476f2e88 < 062ac45c-b9d9-11d9-ba27-0003476f2e88

However, according to the DCE specification, the expected result
should be:

865e1a56-b9d9-11d9-ba27-0003476f2e88 > 062ac45c-b9d9-11d9-ba27-0003476f2e88

This commit adds a new intermediate variable which uses int64_t
to store the result of subtraction between the two time_low values,
which would not introduce different semantic of the MSB found in
time_low value.

PR: 83107
Submitted by: Steve Sears <sjs at acm dot org>
MFC After: 1 month

17 years agoAlphabetical order is probably better.
jb [Thu, 3 Aug 2006 03:30:53 +0000 (03:30 +0000)]
Alphabetical order is probably better.

17 years agoAdd the library directory where DTrace library scripts live.
jb [Thu, 3 Aug 2006 03:28:03 +0000 (03:28 +0000)]
Add the library directory where DTrace library scripts live.

17 years agoFix re(4) breakge introduced in tree from rev 1.68.
yongari [Thu, 3 Aug 2006 00:15:19 +0000 (00:15 +0000)]
Fix re(4) breakge introduced in tree from rev 1.68.
This should fix incorrect configuration of station address on
big-endian architectures.

Reviewed by: wpaul
Tested on: sparc64

17 years agoMove destroying kqueue state from above pru_detach to below it in
rwatson [Wed, 2 Aug 2006 18:37:44 +0000 (18:37 +0000)]
Move destroying kqueue state from above pru_detach to below it in
sofree(), as a number of protocols expect to be able to call
soisdisconnected() during detach.  That may not be a good assumption,
but until I'm sure if it's a good assumption or not, allow it.

17 years agoDon't ignore errors from intr_event_add_handler().
jhb [Wed, 2 Aug 2006 17:50:31 +0000 (17:50 +0000)]
Don't ignore errors from intr_event_add_handler().

CID: 1516
Found by: Coverity Prevent (tm)

17 years ago- Use m_getcl(), m_get(), and m_gethdr() rather than the older macros for
jhb [Wed, 2 Aug 2006 17:41:58 +0000 (17:41 +0000)]
- Use m_getcl(), m_get(), and m_gethdr() rather than the older macros for
  alloc'ing mbufs so that there is less error handling required.
- Go ahead and account for the data space in the first mbuf before entering
  the loop to alloc more mbuf's.  This simplifies the loop logic and avoids
  confusing Coverity.

CID: 817
Reviewed by: sam
Tested by: pjd
Found by: Coverity Prevent (tm)

17 years agoRemove remnants of Alpha.
marcel [Wed, 2 Aug 2006 17:22:30 +0000 (17:22 +0000)]
Remove remnants of Alpha.

17 years agoRemove remnants of Alpha.
marcel [Wed, 2 Aug 2006 17:16:48 +0000 (17:16 +0000)]
Remove remnants of Alpha.

17 years agoDefine the additional page fault error codes that are implemented by amd64.
alc [Wed, 2 Aug 2006 16:24:23 +0000 (16:24 +0000)]
Define the additional page fault error codes that are implemented by amd64.

17 years agoChange two XXX's to two notes: the fact that SOCK_LOCK(so) ==
rwatson [Wed, 2 Aug 2006 16:23:52 +0000 (16:23 +0000)]
Change two XXX's to two notes: the fact that SOCK_LOCK(so) ==
SOCKBUF_LOCK(&so->so_rcv) is encoded, which is worth noting, but not a
bug.

17 years agoRemove call to soisdisconnected() in at_pcbdetach(): by the time the
rwatson [Wed, 2 Aug 2006 16:22:34 +0000 (16:22 +0000)]
Remove call to soisdisconnected() in at_pcbdetach(): by the time the
socket is being detached, there are no consumers left worth notifying
about the disconnect.

17 years agoMove soisdisconnected() in tcp_discardcb() to one of its calling contexts,
rwatson [Wed, 2 Aug 2006 16:18:05 +0000 (16:18 +0000)]
Move soisdisconnected() in tcp_discardcb() to one of its calling contexts,
tcp_twstart(), but not to the other, tcp_detach(), as the socket is
already being torn down and therefore there are no listeners.  This avoids
a panic if kqueue state is registered on the socket at close(), and
eliminates to XXX comments.  There is one case remaining in which
tcp_discardcb() reaches up to the socket layer as part of the TCP host
cache, which would be good to avoid.

Reported by: Goran Gajic <ggajic at afrodita dot rcub dot bg dot ac dot yu>

17 years agoFix some bugs in the previous revision (1.419). Don't perform extra
jhb [Wed, 2 Aug 2006 15:27:48 +0000 (15:27 +0000)]
Fix some bugs in the previous revision (1.419).  Don't perform extra
vfs_rel() on the mountpoint if the MAC checks fail in kern_statfs() and
kern_fstatfs().  Similarly, don't perform an extra vfs_rel() if we get
a doomed vnode in kern_fstatfs(), and handle the case of mp being NULL
(for some doomed vnodes) by conditionalizing the vfs_rel() in
kern_fstatfs() on mp != NULL.

CID: 1517
Found by: Coverity Prevent (tm) (kern_fstatfs())
Pointy hat to: jhb

17 years agoFix doxygen target.
netchild [Wed, 2 Aug 2006 15:26:15 +0000 (15:26 +0000)]
Fix doxygen target.

Submitted by: "Alexander Mogilny" <sg@astral.ntu-kpi.kiev.ua>
Pointy hat to: netchild

17 years agoFix build when .CURDIR != .OBJDIR.
netchild [Wed, 2 Aug 2006 15:24:59 +0000 (15:24 +0000)]
Fix build when .CURDIR != .OBJDIR.

Noticed by: "Alexander Mogilny" <sg@astral.ntu-kpi.kiev.ua>

17 years agoDo not leak memory while flushing rules.
oleg [Wed, 2 Aug 2006 14:58:51 +0000 (14:58 +0000)]
Do not leak memory while flushing rules.

Noticed by: yar
Approved by: glebius (mentor)
MFC after: 1 week

17 years agoRemove now unneeded ENOTCONN clause from SOCK_DGRAM side of uipc_send():
rwatson [Wed, 2 Aug 2006 14:30:58 +0000 (14:30 +0000)]
Remove now unneeded ENOTCONN clause from SOCK_DGRAM side of uipc_send():
we have to check it regardless of the target address, so don't check it
twice.

17 years agoAdd a new command-line option, -P, which allows the user to specify
bms [Wed, 2 Aug 2006 13:21:44 +0000 (13:21 +0000)]
Add a new command-line option, -P, which allows the user to specify
an arbitrary port to which syslog messages are to be sent.

PR: bin/54026
Submitted by: Oliver Fromme
MFC after: 10 days

17 years agoBlock a variety of signals which may afffect reboot(8), before killing
bms [Wed, 2 Aug 2006 13:05:38 +0000 (13:05 +0000)]
Block a variety of signals which may afffect reboot(8), before killing
init(8), to avoid losing a race to them and dying before being able
to call reboot(2).

PR: bin/64664
Submitted by: maxim
Obtained from: NetBSD
MFC after: 30 days

17 years agoRemove 'register'.
rwatson [Wed, 2 Aug 2006 13:01:58 +0000 (13:01 +0000)]
Remove 'register'.
Use ANSI C prototypes/function headers.
More deterministically line wrap comments.

17 years agoBlock SIGHUP before killing init(8), to avoid a race condition which may
bms [Wed, 2 Aug 2006 12:42:20 +0000 (12:42 +0000)]
Block SIGHUP before killing init(8), to avoid a race condition which may
kill the current process and hang the system when attempting reboot.

PR: bin/64664
Reviewed by: ssouhal, phk (historic)
MFC after: 30 days

17 years agoRegenerate.
davidxu [Wed, 2 Aug 2006 08:14:01 +0000 (08:14 +0000)]
Regenerate.

17 years agoDon't include sys/thr.h and umtx.h in sys/sysproto.h, it is unnecessary.
davidxu [Wed, 2 Aug 2006 08:09:24 +0000 (08:09 +0000)]
Don't include sys/thr.h and umtx.h in sys/sysproto.h, it is unnecessary.

17 years agodon't include sys/thr.h and sys/umtx.h, it is unnecessary.
davidxu [Wed, 2 Aug 2006 07:38:59 +0000 (07:38 +0000)]
don't include sys/thr.h and sys/umtx.h, it is unnecessary.

17 years agoINT_MAX is defined in file sys/limits.h, include the file now.
davidxu [Wed, 2 Aug 2006 07:34:51 +0000 (07:34 +0000)]
INT_MAX is defined in file sys/limits.h, include the file now.

17 years agoCleanup and add our standard SYNOPSIS section.
brueffer [Wed, 2 Aug 2006 07:02:19 +0000 (07:02 +0000)]
Cleanup and add our standard SYNOPSIS section.

17 years agoReplace hard-coded magic constants to system defined constants
yongari [Wed, 2 Aug 2006 05:28:52 +0000 (05:28 +0000)]
Replace hard-coded magic constants to system defined constants
(BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc). These pseudo PHY
drivers were forgotten from the conversion due to the repo copy
to dc driver location.

17 years agoremove unneccessary null ptr check
sam [Wed, 2 Aug 2006 04:55:04 +0000 (04:55 +0000)]
remove unneccessary null ptr check

Coverity ID: 173918

17 years agoremove unnecessary null ptr check
sam [Wed, 2 Aug 2006 04:54:14 +0000 (04:54 +0000)]
remove unnecessary null ptr check

Coverity ID: 173911

17 years agoDocument the log_stp variable.
thompsa [Wed, 2 Aug 2006 04:11:25 +0000 (04:11 +0000)]
Document the log_stp variable.

17 years ago- Use the new bridgestp callback to once again flush our bridge routes when an
thompsa [Wed, 2 Aug 2006 03:54:28 +0000 (03:54 +0000)]
- Use the new bridgestp callback to once again flush our bridge routes when an
  interface is disabled.
- Log port changes to syslog, defaulting to off

17 years agoTell bridgestp that we are about to free the memory so it can cleanup.
thompsa [Wed, 2 Aug 2006 02:59:24 +0000 (02:59 +0000)]
Tell bridgestp that we are about to free the memory so it can cleanup.

17 years agoFix style in the last commit, the variable declaration goes at the top of the
thompsa [Wed, 2 Aug 2006 02:51:42 +0000 (02:51 +0000)]
Fix style in the last commit, the variable declaration goes at the top of the
function.

17 years agoAdd a callback so we can notify the parent bridge that a port state change has
thompsa [Wed, 2 Aug 2006 02:47:27 +0000 (02:47 +0000)]
Add a callback so we can notify the parent bridge that a port state change has
occured, we need to do this from a taskqueue to avoid a LOR with the if_bridge
mutex.

17 years agoFix incorrect busy check for PHY write operation.
yongari [Wed, 2 Aug 2006 02:36:59 +0000 (02:36 +0000)]
Fix incorrect busy check for PHY write operation.
While I'm here remove unnecessary return statement.

17 years agoBe sure to disable the port when removing it from STP.
thompsa [Wed, 2 Aug 2006 01:36:40 +0000 (01:36 +0000)]
Be sure to disable the port when removing it from STP.

17 years agoMove updated of 'numopensockets' from bottom of sodealloc() to the top,
rwatson [Wed, 2 Aug 2006 00:45:27 +0000 (00:45 +0000)]
Move updated of 'numopensockets' from bottom of sodealloc() to the top,
eliminating a second set of identical mutex operations at the bottom.
This allows brief exceeding of the max sockets limit, but only by
sockets in the last stages of being torn down.

17 years agoDon't use f-word in comments. We are gentlemans.
pjd [Tue, 1 Aug 2006 23:17:33 +0000 (23:17 +0000)]
Don't use f-word in comments. We are gentlemans.

Pointed out by: Maciej Sobczak

17 years agoFix two nits in the ps header that offset each other making them largely
jhb [Tue, 1 Aug 2006 22:30:55 +0000 (22:30 +0000)]
Fix two nits in the ps header that offset each other making them largely
unnoticable.

17 years agoAdd device to access and modify Open Firmware NVRAM settings in
sobomax [Tue, 1 Aug 2006 22:19:01 +0000 (22:19 +0000)]
Add device to access and modify Open Firmware NVRAM settings in
PowerPC-based Apple's machines and small utility to do it from
userland modelled after the similar utility in Darwin/OSX.

Only tested on 1.25GHz G4 Mac Mini.

MFC after: 1 month