]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoTune format scoring so (non)stereo format will get better chance
ariff [Sun, 29 Jan 2006 01:32:37 +0000 (01:32 +0000)]
Tune format scoring so (non)stereo format will get better chance
to be selected.

18 years agoAdd a reference to geli(8).
pjd [Sun, 29 Jan 2006 00:32:40 +0000 (00:32 +0000)]
Add a reference to geli(8).

MFC after: 3 days

18 years agoIf the sysctl kern.pts.enable doesn't exist, check that /dev/ptmx is there,
cognet [Sun, 29 Jan 2006 00:02:57 +0000 (00:02 +0000)]
If the sysctl kern.pts.enable doesn't exist, check that /dev/ptmx is there,
and if so, use the pts system.

Suggested by: rwatson

18 years agoRename use_old_pty variable to use_pts, as this more accurately reflects
rwatson [Sat, 28 Jan 2006 23:31:19 +0000 (23:31 +0000)]
Rename use_old_pty variable to use_pts, as this more accurately reflects
the sense of the variable.

Suggested by: dwhite

18 years agoDon't try to load KLDs if we're mounting the root. We'd otherwise panic.
ssouhlal [Sat, 28 Jan 2006 22:58:39 +0000 (22:58 +0000)]
Don't try to load KLDs if we're mounting the root. We'd otherwise panic.

Tested by: kris
MFC after: 3 days

18 years agoUse $FreeBSD$ for the juggle version, rather than $P4$. This is good for
rwatson [Sat, 28 Jan 2006 21:03:16 +0000 (21:03 +0000)]
Use $FreeBSD$ for the juggle version, rather than $P4$.  This is good for
two reasons:

(1) juggle is now maintained in CVS, not P4, so the CVS revision number is
    the authoritative one.
(2) Apparently $P4$ requires special handling and juggle was not marked
    as needing it, resulting in problems for the P4 importer.

Requested by: gordon

18 years agoManage the ucred for the NFS server using the crget/crfree API defined in
csjp [Sat, 28 Jan 2006 19:24:40 +0000 (19:24 +0000)]
Manage the ucred for the NFS server using the crget/crfree API defined in
kern_prot.c. This API handles reference counting among many other things.
Notably, if MAC is compiled into the kernel, it will properly initialize the
MAC labels when the ucred is allocated.

This work is in preparation for a new MAC entry point which will be responsible
for properly initializing policy specific labels for the NFS server credential.
Utilization of the crfree/crget APIs reduce the complexity associated with
this label's management.

Submitted by: green (with changes) [1]
Obtained from: TrustedBSD Project
Discussed with: rwatson, alfred

[1] I moved the ucred allocation outside the scope of the NFS server lock to
    prevent M_WAIKOK allocations from occurring with non-sleep-able locks held.
    Additionally, to reduce complexity, the ucred persist as long as the NFS
    server descriptor.

18 years agos/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/
marcel [Sat, 28 Jan 2006 17:58:22 +0000 (17:58 +0000)]
s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/

18 years agos/R_IA64_/R_IA_64_/
marcel [Sat, 28 Jan 2006 17:56:16 +0000 (17:56 +0000)]
s/R_IA64_/R_IA_64_/

18 years agoAdd _rwlock.h, apparently missed from the rwlock.h commit.
scottl [Sat, 28 Jan 2006 17:51:20 +0000 (17:51 +0000)]
Add _rwlock.h, apparently missed from the rwlock.h commit.

18 years agoSquash another invalid use of BUS_DMA_ALLOCNOW.
scottl [Sat, 28 Jan 2006 15:50:19 +0000 (15:50 +0000)]
Squash another invalid use of BUS_DMA_ALLOCNOW.

MFC After: 3 days

18 years ago- Add a note that passing NULL to pidfile_write(), pidfile_remove() and
pjd [Sat, 28 Jan 2006 14:13:15 +0000 (14:13 +0000)]
- Add a note that passing NULL to pidfile_write(), pidfile_remove() and
  pidfile_close() functions is safe. This possibility is used in example code.
- Cast pid_t to int.

Requested by: yar

18 years ago- Add ports-net-p2p collection
pav [Sat, 28 Jan 2006 11:08:47 +0000 (11:08 +0000)]
- Add ports-net-p2p collection

18 years agoNever do programs contain so few bugs as when no debugging tools
dds [Sat, 28 Jan 2006 09:19:20 +0000 (09:19 +0000)]
Never do programs contain so few bugs as when no debugging tools
are available.
                -- Niklaus Wirth

Pointed by: Panagiotis Louridas

18 years agoBack out r1.653; it turns out that the race (or at least the printf) is
kris [Sat, 28 Jan 2006 03:06:35 +0000 (03:06 +0000)]
Back out r1.653; it turns out that the race (or at least the printf) is
actually not hard to trigger, and it can cause a lot of console spam.

Approved by: kan

18 years ago- Mention that users need to be in the wheel group to `su - root' by default, and...
brd [Sat, 28 Jan 2006 01:11:11 +0000 (01:11 +0000)]
- Mention that users need to be in the wheel group to `su - root' by default, and how to change it.

PR: docs/70616
Submitted by: Jilles Tjoelker <jilles at stack dot nl>
Reviewed by: ru@
Approved by: ceri@
MFC after: 3 days

18 years agolock unused when INVARIANTS not defined, so don't declare it then
imp [Sat, 28 Jan 2006 00:49:31 +0000 (00:49 +0000)]
lock unused when INVARIANTS not defined, so don't declare it then

18 years agoAdd a basic reader/writer lock implementation to the kernel. This
jhb [Fri, 27 Jan 2006 23:13:26 +0000 (23:13 +0000)]
Add a basic reader/writer lock implementation to the kernel.  This
implementation is by no means perfect as far as some of the algorithms
that it uses and the fact that it is missing some functionality (try
locks and upgrades/downgrades are not there yet), however it does seem
to work in my local testing.  There is more detail in the comments in the
code, but the short version follows.

A reader/writer lock is very much like a regular mutex: it cannot be held
across a voluntary sleep; it can be acquired in an interrupt thread; if
the lock is held by a writer then the priority of any threads that block
on the lock will be lent to the owner; the simple case lock operations all
are done in a single atomic op.  It also shares some similiarities
with sx locks: it supports reader/writer semantics (multiple readers,
but single writers); readers are allowed to recurse, but writers are not.

We can extend this implementation further by either improving algorithms
or adding new functionality, but this should at least give us a base to
work with now.

Reviewed by: arch (in theory)
Tested on: i386 (4 cpu box with a kernel module that used 4 threads
that randomly chose between read locks and write locks
that ran w/o panicing for over a day solid.  It usually
panic'd within a few seconds when there were bugs during
testing. :)  The kernel module source is available on
request.)

18 years agoWhitespace.
jhb [Fri, 27 Jan 2006 23:06:08 +0000 (23:06 +0000)]
Whitespace.

18 years agoOops, commit missed file from the previous change to enable multiple
jhb [Fri, 27 Jan 2006 23:04:43 +0000 (23:04 +0000)]
Oops, commit missed file from the previous change to enable multiple
queues in turnstiles.  Add a new thread member td_tsqueue which contains
the sub-queue of a turnstile that a thread is on when it is blocked on a
turnstile.

18 years ago- Add support for having both a shared and exclusive queue of threads in
jhb [Fri, 27 Jan 2006 22:42:12 +0000 (22:42 +0000)]
- Add support for having both a shared and exclusive queue of threads in
  each turnstile.  Also, allow for the owner thread pointer of a turnstile
  to be NULL.  This is needed for the upcoming reader/writer lock
  implementation.
- Add a new ddb command 'show turnstile' that will look up the turnstile
  associated with the given lock argument and display useful information
  like the list of threads blocked on each queue, etc.  If there isn't an
  active turnstile for a lock at the specified address, then the function
  will see if there is an active turnstile at the specified address and
  display info about it if so.
- Adjust the mutex code to handle the turnstile API changes.

Tested on: i386 (all), alpha, amd64, sparc64 (1 and 3)

18 years agoAdd a new ddb command 'show sleepq'. It takes a wait channel as an
jhb [Fri, 27 Jan 2006 22:24:07 +0000 (22:24 +0000)]
Add a new ddb command 'show sleepq'.  It takes a wait channel as an
argument and looks for a sleep queue associated with that wait channel.
If it finds one it will display information such as the list of threads
sleeping on that queue.  If it can't find a sleep queue for that wait
channel, then it will see if that address matches any of the active
sleep queues.  If so, it will display information about the sleepq at the
specified address.

18 years agoCall WITNESS_CHECK() in the page fault handler and immediately assume it
jhb [Fri, 27 Jan 2006 22:22:10 +0000 (22:22 +0000)]
Call WITNESS_CHECK() in the page fault handler and immediately assume it
is a fatal fault if we are holding any non-sleepable locks.  This should
cut down on the number of bogus LORs we currently get when the kernel
panics due to a NULL (or bogus) pointer dereference that goes wandering
off into the VM system which tries to acquire locks and then kicks off
the spurious LORs.  This should probably be ported to all the archs at
some point.

Tested on: i386

18 years agoAdd a new macro wrapper WITNESS_CHECK() around the witness_warn() function.
jhb [Fri, 27 Jan 2006 22:20:15 +0000 (22:20 +0000)]
Add a new macro wrapper WITNESS_CHECK() around the witness_warn() function.
The difference between WITNESS_CHECK() and WITNESS_WARN() is that
WITNESS_CHECK() should be used in the places that the return value of
witness_warn() is checked, whereas WITNESS_WARN() should be used in places
where the return value is ignored.  Specifically, in a kernel without
WITNESS enabled, WITNESS_WARN() evaluates to an empty string where as
WITNESS_CHECK evaluates to 0.  I also updated the one place that was
checking the return value of WITNESS_WARN() to use WITNESS_CHECK.

18 years agoAdd a new sysctl, debug.ktr.clear. If you write a non-zero value to this
jhb [Fri, 27 Jan 2006 22:17:31 +0000 (22:17 +0000)]
Add a new sysctl, debug.ktr.clear.  If you write a non-zero value to this
sysctl then it will clear the KTR buffer.  Note that if you have active
KTR traces at the same time as a clear operation the behavior is undefined,
though it shouldn't panic.

18 years ago- Hide 'incorrect geometry warning' in non-interactive mode. A user should
jkim [Fri, 27 Jan 2006 21:41:49 +0000 (21:41 +0000)]
- Hide 'incorrect geometry warning' in non-interactive mode.  A user should
know what they are doing in non-interactive mode.  Less scarier warning
goes to debugging info instead.
- Print sanitized geometry to debugging info.

18 years agoMake sure b_vp and b_bufobj are NULL before calling relpbuf(), as it asserts
cognet [Fri, 27 Jan 2006 21:11:50 +0000 (21:11 +0000)]
Make sure b_vp and b_bufobj are NULL before calling relpbuf(), as it asserts
they are. They should be NULL at this point, except if we're coming from
swapdev_strategy().
It should only affect the case where we're swapping directly on a file over
NFS.

18 years agoTry harder not to recurse.
cognet [Fri, 27 Jan 2006 21:07:04 +0000 (21:07 +0000)]
Try harder not to recurse.

18 years agoStyle: Add blank line after local variable declarations.
alc [Fri, 27 Jan 2006 21:06:37 +0000 (21:06 +0000)]
Style: Add blank line after local variable declarations.

18 years agoAdd some wisdom from Garrett Wollman concerning error codes returned by
cperciva [Fri, 27 Jan 2006 21:06:19 +0000 (21:06 +0000)]
Add some wisdom from Garrett Wollman concerning error codes returned by
system calls.

18 years agoAdd `mediaOpen' function. This function mounts selected media device.
jkim [Fri, 27 Jan 2006 21:00:31 +0000 (21:00 +0000)]
Add `mediaOpen' function.  This function mounts selected media device.

For example, you can dynamically generate and load configuration file
depending on the hardware configuration with the following template:

mediaSetCDROM
mediaOpen
command='/dist/rescue/sh /dist/scripts/install.sh'
system
mediaClose
configFile=/tmp/generated.cfg
loadConfig

Now we have full access to files on the media before installation begins.

18 years agoHave a function pointer to the routine to call for writing an mbuf
imp [Fri, 27 Jan 2006 19:10:13 +0000 (19:10 +0000)]
Have a function pointer to the routine to call for writing an mbuf
into the card's memory.

# this eliminates a more of the ifdef soup in if_ed and if_edvar

# I've fixed the cbus drivers, but can't test them all easily.

If I've broken anything, please let me know.

18 years agoDocument the user/group LOR in our sample pf.conf
mlaier [Fri, 27 Jan 2006 17:16:20 +0000 (17:16 +0000)]
Document the user/group LOR in our sample pf.conf

Submitted by: Devon H. O'Dell

18 years agoThe .Nm macro prints Open_Disk() instead of libdisk, so use an explicite
harti [Fri, 27 Jan 2006 16:38:05 +0000 (16:38 +0000)]
The .Nm macro prints Open_Disk() instead of libdisk, so use an explicite
argument to get 'libdisk'. Also bump the date of the man page.

18 years agoForced commit because the log message in the previous commit was wrong.
harti [Fri, 27 Jan 2006 16:35:45 +0000 (16:35 +0000)]
Forced commit because the log message in the previous commit was wrong.
Warn people that this library should not be used for anything new.

18 years agoRevert 1.45 now that snmp_hostres uses libgeom.
harti [Fri, 27 Jan 2006 16:32:13 +0000 (16:32 +0000)]
Revert 1.45 now that snmp_hostres uses libgeom.

18 years agoMerge a bunch of changes that where done in tty_pty.c after tty_pts.c was
cognet [Fri, 27 Jan 2006 15:13:40 +0000 (15:13 +0000)]
Merge a bunch of changes that where done in tty_pty.c after tty_pts.c was
forked from it, but missed from some reason.

18 years agoMerge from accidental commit to RELENG_5:
cperciva [Fri, 27 Jan 2006 14:42:15 +0000 (14:42 +0000)]
Merge from accidental commit to RELENG_5:
  Correctly identify the host and port values on a failed
  getaddrinfo lookup.

18 years agoMake an example command correct and copyable to terminal.
glebius [Fri, 27 Jan 2006 11:56:59 +0000 (11:56 +0000)]
Make an example command correct and copyable to terminal.

Submitted by: ru

18 years agoUpdate NGM_PPPOE_GETMODE and NGM_PPPOE_SETMODE descriptions, since
glebius [Fri, 27 Jan 2006 11:28:32 +0000 (11:28 +0000)]
Update NGM_PPPOE_GETMODE and NGM_PPPOE_SETMODE descriptions, since
new D-Link compat mode is introduced.

18 years agoCall NDFREE() only when vn_open() succeeded.
pjd [Fri, 27 Jan 2006 11:27:55 +0000 (11:27 +0000)]
Call NDFREE() only when vn_open() succeeded.

MFC after: 3 days

18 years agoGrr. Backout previous change. vn_open_cred() will call NDFREE() on failure.
pjd [Fri, 27 Jan 2006 11:25:06 +0000 (11:25 +0000)]
Grr. Backout previous change. vn_open_cred() will call NDFREE() on failure.

18 years agoDon't forget to call NDFREE(9) in case of vn_open_cred() failure.
pjd [Fri, 27 Jan 2006 11:19:53 +0000 (11:19 +0000)]
Don't forget to call NDFREE(9) in case of vn_open_cred() failure.

MFC after: 3 days

18 years agoo Introduce D-Link compat mode, that is default to off and can be set
glebius [Fri, 27 Jan 2006 10:56:22 +0000 (10:56 +0000)]
o Introduce D-Link compat mode, that is default to off and can be set
  by NGM_PPPOE_SETMODE message. When D-Link compat mode is on, we will
  broadcast PADI with empty Service-Name to all listening hooks.
o Rewrite the compatibility options. Before we had two modes - standard
  and non-standard (aka 3Com). Now we have standard mode and two compat
  flags, that can be combined.
o Be consistent and do s/STUPID/3COM/g. I don't say that 3Com mode isn't
  stupid, just want to make code easier to read.

18 years agoadd an option BKTR_USE_FREEBSD_SMBUS that enables compiling the module
jmg [Fri, 27 Jan 2006 09:08:32 +0000 (09:08 +0000)]
add an option BKTR_USE_FREEBSD_SMBUS that enables compiling the module
with same option...

MFC after: 3 days

18 years agoInitial import of ce(4) driver for Cronyx Tau-PCI/32 adapters.
rik [Fri, 27 Jan 2006 09:02:09 +0000 (09:02 +0000)]
Initial import of ce(4) driver for Cronyx Tau-PCI/32 adapters.
Not yet connected to the build.

18 years agomake wall(1) work with pts.
ume [Fri, 27 Jan 2006 08:52:14 +0000 (08:52 +0000)]
make wall(1) work with pts.

18 years agoif we are compiling with smbus support, properly depend upon the iic and
jmg [Fri, 27 Jan 2006 08:42:48 +0000 (08:42 +0000)]
if we are compiling with smbus support, properly depend upon the iic and
smbus modules, otherwise as a module you can't kldload bktr...

MFC after: 3 days

18 years agoUse the new macros abstracting the page coloring/queues implementation.
alc [Fri, 27 Jan 2006 08:35:32 +0000 (08:35 +0000)]
Use the new macros abstracting the page coloring/queues implementation.
(There are no functional changes.)

18 years agoCreate mediachg functions for the 3c503 and hpp cards. This is used
imp [Fri, 27 Jan 2006 08:25:47 +0000 (08:25 +0000)]
Create mediachg functions for the 3c503 and hpp cards.  This is used
to properly configure the right interface to use.

Also call the mediachg function when we set flags UP and are already
running.  If this were a pure ifmedia driver, we'd not need to do this
since we'd be ignoring the linkX flags.

This reduces the number of ifdefs to support sub-devices a little as a
nice side effect.  It also reduces the number of hpp interfaces
exposed by 33%.

18 years agoStyle(9) issue: return (foo);
imp [Fri, 27 Jan 2006 08:10:36 +0000 (08:10 +0000)]
Style(9) issue: return (foo);

18 years agoJust like dofilewrite(), call bwillwrite before fo_write.
davidxu [Fri, 27 Jan 2006 08:02:25 +0000 (08:02 +0000)]
Just like dofilewrite(), call bwillwrite before fo_write.

18 years agoTransition from ALTPHYS to LINK2. We already document in the ed(4)
imp [Fri, 27 Jan 2006 08:00:40 +0000 (08:00 +0000)]
Transition from ALTPHYS to LINK2.  We already document in the ed(4)
man page that the ifconfig option link2 is used to disable the AUI
transceiver on the 3com boards (should also say HP PC Lan+).  This
makes the connection clearer.

Add a note about why we set this flag prior to attaching the device.
We never set or clear the flag later, only test it.  There can be no
races here, but this might be asthetically displeasing to some.  Also
note that we may no longer need to have this knob at all as we may be
able to do it with the more sophisticated rc.d scripts we have today I
think the only reason it is there is because we didn't used to allow
its proper setting when configured to get the IP address via DHCP.

I'll note that this would be better handled by using ifmedia for all
ed cards, not just those with a miibus...

18 years agominor nit in comment about what kind of flags these are
imp [Fri, 27 Jan 2006 07:51:26 +0000 (07:51 +0000)]
minor nit in comment about what kind of flags these are

18 years agoRemove unwarranted uses of 'goto'.
jasone [Fri, 27 Jan 2006 07:46:22 +0000 (07:46 +0000)]
Remove unwarranted uses of 'goto'.

18 years agoUse the new macros abstracting the page coloring/queues implementation.
alc [Fri, 27 Jan 2006 07:28:51 +0000 (07:28 +0000)]
Use the new macros abstracting the page coloring/queues implementation.
(There are no functional changes.)

18 years agoAdd NO_MALLOC_EXTRAS, so that various extra features that can cause
jasone [Fri, 27 Jan 2006 04:42:10 +0000 (04:42 +0000)]
Add NO_MALLOC_EXTRAS, so that various extra features that can cause
performance degradation can be disabled via something like the following
in /etc/malloc.conf:

CFLAGS+=-DNO_MALLOC_EXTRAS

Suggested by: deischen

18 years agoFix the type of a statistics counter (unsigned --> unsigned long).
jasone [Fri, 27 Jan 2006 04:36:39 +0000 (04:36 +0000)]
Fix the type of a statistics counter (unsigned --> unsigned long).

18 years agoreturn final error code in aio_return rather than a hardcoded 0.
davidxu [Fri, 27 Jan 2006 04:14:16 +0000 (04:14 +0000)]
return final error code in aio_return rather than a hardcoded 0.

18 years agoNote that options are set using sh(1) syntax.
jkoshy [Fri, 27 Jan 2006 02:46:08 +0000 (02:46 +0000)]
Note that options are set using sh(1) syntax.

MFC after: 3 days

18 years agoClean up statistics gathering and printing.
jasone [Fri, 27 Jan 2006 02:36:44 +0000 (02:36 +0000)]
Clean up statistics gathering and printing.

18 years agoEnable full duplex operation since it works and to solve panic issue.
ariff [Fri, 27 Jan 2006 02:01:27 +0000 (02:01 +0000)]
Enable full duplex operation since it works and to solve panic issue.

PR: kern/91992
MFC after: 2 days

18 years agoHackamatic: turn off target mode on Sparc64 with KLD_MODULE- this triggers
mjacob [Fri, 27 Jan 2006 00:46:10 +0000 (00:46 +0000)]
Hackamatic: turn off target mode on Sparc64 with KLD_MODULE- this triggers
a compiler error I have no idea what its about.

This should unbreak tinderbox for now.

18 years agoTake into account that bits 0x0000ff00 can't be used for minor.
cognet [Fri, 27 Jan 2006 00:21:48 +0000 (00:21 +0000)]
Take into account that bits 0x0000ff00 can't be used for minor.

18 years agoWhen the RAID firmware returns a failure, don't hard error the result.
ambrisko [Thu, 26 Jan 2006 22:39:12 +0000 (22:39 +0000)]
When the RAID firmware returns a failure, don't hard error the result.
This is important with MegaLib, when issuing a GET_REBUILD_PROG since
it returns an error if the drive is not in rebuild state.

This will be MFC'ed shortly.

Submitted by: ps
Reviewed by: scottl
Found by: ambrisko

18 years agoFix a typo : deivce => device
cognet [Thu, 26 Jan 2006 21:48:50 +0000 (21:48 +0000)]
Fix a typo : deivce => device

Spotted by: rwatson

18 years agoAfter changing hostres from libdisk to libgeom, it now compiles
erwin [Thu, 26 Jan 2006 21:32:51 +0000 (21:32 +0000)]
After changing hostres from libdisk to libgeom, it now compiles
and runs on amd64, so revert the stopgap from rev. 1.10

Approved by: harti
Hardware borrowed from: simon

18 years ago- Register the generic implementations for the device shutdown, suspend
marius [Thu, 26 Jan 2006 21:14:32 +0000 (21:14 +0000)]
- Register the generic implementations for the device shutdown, suspend
  and resume methods so these events propagate through the device driver
  hierarchy.
- In dma(4) enable the chaining of the DMA engine interrupt handler for
  the LANCE devices via a dma_setup_intr(). This was commented out before
  as I was unsure whether I'd use it but this is probably cleaner than
  fiddling with the DMA engine interrupt in the LANCE driver directly.
- In ebus_setup_dinfo() free 'intrs' instead of 'reg' twice in case
  setting up a child fails due to routing one of its interrupts fails. [1]

Found by: Coverity Prevent [1]
MFC after: 3 days

18 years agoFix rev 1.12.
brooks [Thu, 26 Jan 2006 21:05:39 +0000 (21:05 +0000)]
Fix rev 1.12.

/tmp may not be writeable yet when dhclient is first run via
/etc/rc.d/netif so using it may not work.  Also, writing to a
predictable file in /tmp as root is a really bad idea since a malicious
user may be able to win a race and insert a symlink which will allow
them to cause any file to be overwritten.  To solve these problems,
create the tempory file in /var/run which will exist this early and is
writable only by root.

Security: Local risk if users can cause dhclient to run on demand
(such as by unplugging and replugging the network cable).

18 years agoDon't attempt to re-create the /dev entry for the slave part if it already
cognet [Thu, 26 Jan 2006 20:54:49 +0000 (20:54 +0000)]
Don't attempt to re-create the /dev entry for the slave part if it already
exist when opening the master. This can happen if one open the master, then
open the slave, then close and re-open the master.

Reported by: Peter Holm

18 years agoAnalogous to __printflike and __scanflike, add the macro __format_arg which
stefanf [Thu, 26 Jan 2006 20:53:40 +0000 (20:53 +0000)]
Analogous to __printflike and __scanflike, add the macro __format_arg which
expands to the GCC format_arg attribute if supported.

This fixes a syntax error in <nl_types.h> for compilers/tools not
implementing the GCC __attribute__ extensions.

18 years agoSince the A-Z range is contained in the previous check, the else-if is
njl [Thu, 26 Jan 2006 19:55:29 +0000 (19:55 +0000)]
Since the A-Z range is contained in the previous check, the else-if is
dead code.  Clean up both by using isprint() instead, since that's what
it really wants.

Coverity ID: 100
Found by: Coverity Prevent

18 years agoopt_vmpage.h is no longer needed here because it is not included by
alc [Thu, 26 Jan 2006 19:21:27 +0000 (19:21 +0000)]
opt_vmpage.h is no longer needed here because it is not included by
vm_page.h.

18 years ago- Only touch the LED bit of the (LED) AUXIO register when turning the
marius [Thu, 26 Jan 2006 19:04:18 +0000 (19:04 +0000)]
- Only touch the LED bit of the (LED) AUXIO register when turning the
  system LED on or off. Unlike the EBus LED AUXIO register where the
  remaining bits are unused the upper bits of the SBus AUXIO register
  are used to control other things like the link test enable pin of
  the on-board NIC which we don't want to change as a side-effect.
- Remove the superfluous bzero()'ing of the softc obtained from
  device_get_softc().

Reviewed by: yongari
MFC after: 3 days

18 years agoVersion bump for pts import.
cognet [Thu, 26 Jan 2006 18:23:16 +0000 (18:23 +0000)]
Version bump for pts import.

18 years agoFrom the RFC2516 it is not clear, what is the correct behavior for a
glebius [Thu, 26 Jan 2006 13:06:49 +0000 (13:06 +0000)]
From the RFC2516 it is not clear, what is the correct behavior for a
PPPoE AC, servicing a specific Service-Name, when client sends a PADI
with an empty Service-Name. Should it reply with all available service
names or should it be silent? Our implementation had chosen the latter,
while some other had chosen the former (they say Linux and Cisco). Now
some PPPoE clients appear, that rely on the assumption that AC will
send all names in a PADO reply to a PADI with wildcard Service-Name.
These clients can't connect to FreeBSD AC.

I have requested comments from authors of RFC2516 via email, but
received no reply.

This change makes FreeBSD AC compatible with D-Link DI-614+ and
D-Link DI-624+ SOHO routers, and probably others.

Big thanks to D-Link's Russian office, namely Victor Platov, for
assistance and support in investigation and testing of this change.

Details:
  o Split pppoe_match_svc() into three different functions serving
    different purposes:
    - pppoe_match_svc() - match non-empty Service-Name tag from PADI
      against all available hooks in listening state.
    - pppoe_find_svc() - check that given Service-Name is not yet
      registered.
    - pppoe_broadcast_padi() - send a copy of PADI packet with empty
      Service-Name tag to all listening hooks.
  o For NGM_PPPOE_LISTEN message use pppoe_find_svc().
  o In ng_pppoe_rcvdata() in a PADI case use pppoe_match_svc() for
    a non-empty Service-Name tag, and pppoe_broadcast_padi() in
    either case.

A side effect from the above changes is that now pppoed(8) and mpd
will reply to a empty Service-Name PADI sending a PADO with two
Service-Name tags - an empty one and correct one. This is not fatal,
and will be corrected in pppoed(8) and mpd later. No need to update
node interface version.

Supported by: D-Link

18 years agoReplace ki_ocomm by ki_comm. The former will go away.
harti [Thu, 26 Jan 2006 12:19:10 +0000 (12:19 +0000)]
Replace ki_ocomm by ki_comm. The former will go away.

Submitted by: Victor Cruceru <soc-victor>
Suggested by:   Julian Elischer

18 years agoFix a bug in the processor load code: the wrong process was used to
harti [Thu, 26 Jan 2006 12:15:06 +0000 (12:15 +0000)]
Fix a bug in the processor load code: the wrong process was used to
get the inital processor load. Also fix compilation on sparc64 without NDEBUG.

18 years agoFix false positives when searching for disks. Things like adv(4) are not
harti [Thu, 26 Jan 2006 11:49:27 +0000 (11:49 +0000)]
Fix false positives when searching for disks. Things like adv(4) are not
disks.

Submitted by: Victor Cruceru <soc-victor@>

18 years agoRemove debug printf.
pjd [Thu, 26 Jan 2006 11:15:08 +0000 (11:15 +0000)]
Remove debug printf.

18 years agoFix the MIB to use libgeom instead of libdisk.
harti [Thu, 26 Jan 2006 10:13:32 +0000 (10:13 +0000)]
Fix the MIB to use libgeom instead of libdisk.

Submitted by: Victor Cruceru <soc-victor>

18 years ago- Fix the www build by removing obsolete references to &hwlist.sound;
brd [Thu, 26 Jan 2006 09:37:24 +0000 (09:37 +0000)]
- Fix the www build by removing obsolete references to &hwlist.sound;

Approved by: ceri@
Pointy Hat to: joel@

18 years agoin aio_aqueue, store same return code into job->_aiocb_private.error.
davidxu [Thu, 26 Jan 2006 08:37:02 +0000 (08:37 +0000)]
in aio_aqueue, store same return code into job->_aiocb_private.error.
in aio_return, unlock proc lock before suword.

18 years agoOptimize arena_bin_pop() to reduce the number of separator operations.
jasone [Thu, 26 Jan 2006 08:11:23 +0000 (08:11 +0000)]
Optimize arena_bin_pop() to reduce the number of separator operations.
Remove the block of code that tries to use delayed regions in LIFO order,
since from a policy perspective, it conflicts with LRU caching of newly
coalesced regions in arena_undelay().  There are numerous policy
alternatives, and it isn't readily obvious which (if any) is superior;
this change at least has the virtue of being consistent with policy.

18 years agooops
mjacob [Thu, 26 Jan 2006 06:15:58 +0000 (06:15 +0000)]
oops

18 years agoPlug a leak in the newer contigmalloc() implementation. Specifically, if
alc [Thu, 26 Jan 2006 05:51:26 +0000 (05:51 +0000)]
Plug a leak in the newer contigmalloc() implementation.  Specifically, if
a multipage allocation was aborted midway, the pages that were already
allocated were not always returned to the free list.

Submitted by: tegge

18 years agoDocument JMicron JMB360.
brueffer [Thu, 26 Jan 2006 05:31:19 +0000 (05:31 +0000)]
Document JMicron JMB360.

18 years agoFix an aliasing error in the new TP support and reenable it in the build.
kientzle [Thu, 26 Jan 2006 05:28:56 +0000 (05:28 +0000)]
Fix an aliasing error in the new TP support and reenable it in the build.

18 years agoPut in at least an attempt to ID the 2422 (4Gb part)
mjacob [Thu, 26 Jan 2006 05:04:35 +0000 (05:04 +0000)]
Put in at least an attempt to ID the 2422 (4Gb part)

18 years agoDocument a bit pts.
cognet [Thu, 26 Jan 2006 01:34:49 +0000 (01:34 +0000)]
Document a bit pts.

18 years agoMake getttyent() report what the pts ptys as well.
cognet [Thu, 26 Jan 2006 01:34:26 +0000 (01:34 +0000)]
Make getttyent() report what the pts ptys as well.

18 years agoptsname() bits for pts.
cognet [Thu, 26 Jan 2006 01:33:55 +0000 (01:33 +0000)]
ptsname() bits for pts.

18 years agoTeach openpty() how to deal with pts.
cognet [Thu, 26 Jan 2006 01:33:26 +0000 (01:33 +0000)]
Teach openpty() how to deal with pts.

18 years agoLinux compat bits needed to make linux programs use the new ptys :
cognet [Thu, 26 Jan 2006 01:32:46 +0000 (01:32 +0000)]
Linux compat bits needed to make linux programs use the new ptys :
linux_ioctl.[ch] : Implement LINUX_TIOCGPTN, which returns the pty number
linux_stats.c :
- Return the magic number for devfs.
- In various stats()-related functions, check that we're stating a
file in /dev/pts, and if so, change the st_rdev field to match what linux
expects to be there for a slave pty device. The glibc checks for this, and
their openpty() fails if it is no correct.

18 years agoBring in a sysv-style pts implementation, as found in the rwatson_pts perforce branc...
cognet [Thu, 26 Jan 2006 01:30:34 +0000 (01:30 +0000)]
Bring in a sysv-style pts implementation, as found in the rwatson_pts perforce  branch. It works the same as its SysV/linux counterpart : You obtain a fd to    the master pseudo terminal by opening /dev/ptmx, which craetes a node for the   master as /dev/pty[num] and a node for the slave as /dev/pts/[num].
It should play nicely with the existing BSD ptys.
By default, the system will use the BSD ptys, one can set the sysctl
kern.pts.enable to 1 to make it use the new pts system.
The max number of pty that can be allocated on a system can be changed with the
sysctl kern.pts.max. It defaults to 1000, and can be increased, but it is not
recommanded, as any pty with a number > 999 won't be handled by whatever uses
utmp(5).

18 years ago- Add a umass quirk that should have been part of latest commit.
flz [Thu, 26 Jan 2006 01:23:29 +0000 (01:23 +0000)]
- Add a umass quirk that should have been part of latest commit.

Approved by: iedowse (implicit)
MFC after: 3 days

18 years agoAdd Product IDs :
flz [Thu, 26 Jan 2006 00:35:54 +0000 (00:35 +0000)]
Add Product IDs :
- Sandisk Cruzer Micro 128MB [5]
- DANE-ELEC zMate 512MB USB flash drive [7]
- Attache 256MB USB 2.0 Flash Drive [8]
- Sandisk Cruzer Micro 256MB [9]

Add scsi_da.c quirks :
- Samsung USB key 128Mb [1]
- Kingston DataTraveler 2.0 [2]
- Creative MuVo Slim [3]
- United MP 5512 Portable MP3 Player [4]
- Sandisk Cruzer Micro 128MB [5], [9]
- PNY USB Flash keys [6], [7], [8]

Add umass.c quirks :
- Sandisk Cruzer Micro 128MB [5]
- DANE-ELEC zMate 512MB USB flash drive [7]
- Attache 256MB USB 2.0 Flash Drive [8]
- Sandisk Cruzer Micro 256MB [9]

PR: usb/90081 [1],
usb/89196 [2],
kern/86131 [3],
usb/80487 [4],
usb/75970 [5],
usb/75578 [6],
usb/72344 [7],
usb/65436 [8],
usb/70835 [9]
Submitted by: Henri-Pierre CHARLES <hpc@prism.uvsq.fr> [1],
Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> [2],
Erich Rickheit KSC <rickheit-fbp@numachi.com> [3],
tnu@chania.di.uoa.gr [4],
Bram Abbekerk <bram@abbekerk.demon.nl> [5],
Thomas Pornin <pornin@bolet.org> [6],
parv <parv@pair.com> [7],
Peter D. Quilty <pdquilty@adelphia.net> [8],
Raymundo M. Vega <rvega@ms-smtp-03-eri0.socal.rr.com> [9]
Approved by: iedowse
MFC after: 3 days

18 years ago- Fix infinite loop in strip_log().
flz [Wed, 25 Jan 2006 23:47:12 +0000 (23:47 +0000)]
- Fix infinite loop in strip_log().
- Remove useless variable.

Submitted by: jkim
Approved by: jkim

18 years agoAdd support for the JMicron JMB360 SATAII controller.
sos [Wed, 25 Jan 2006 23:07:42 +0000 (23:07 +0000)]
Add support for the JMicron JMB360 SATAII controller.
Thanks to JMicron for providing needed info.

HW donated by: Ralf Folkerts

18 years agoRemove sound since the sound(4) manual page no longer have a
joel [Wed, 25 Jan 2006 21:15:58 +0000 (21:15 +0000)]
Remove sound since the sound(4) manual page no longer have a
HARDWARE section.

Reviewed by: brueffer