rwatson [Tue, 8 Aug 2006 19:22:25 +0000 (19:22 +0000)]
Add kqueue support to if_tun. Loosely based on if_tap changes.
Two almost identical patches based on the if_tap work were submitted
via GNATS; I started out with the patch in 100796 from David Gilbert,
but could have easily started with the patch from Vilmos Nebehaj which
I found only later.
kib [Tue, 8 Aug 2006 12:29:26 +0000 (12:29 +0000)]
Lock the vnode around the call to VOP_GETATTR. Move the locked code
and vn_fullpath (that call malloc(..., M_WAITOK)) from under the
vm object lock, since sleep is not allowed while holding the mutex.
Being there, wrap VOP_GETATTR call with conditional Giant aquire.
Currently this is (almost) noop because pseudofs is Giant-locked.
alc [Tue, 8 Aug 2006 06:00:49 +0000 (06:00 +0000)]
Reduce the scope of the page queues lock in vfs_busy_pages() now that
vm_page_sleep_if_busy() no longer requires the caller to hold the page
queues lock.
njl [Tue, 8 Aug 2006 01:33:03 +0000 (01:33 +0000)]
Remove the global dock variable. Each dock device should be able to
function independently. This change is not only load-tested since I don't
have hardware that supports acpi_dock. Clean up comments and a name a
few constants.
netchild [Mon, 7 Aug 2006 23:35:49 +0000 (23:35 +0000)]
Say welcome to 'sade', the SysAdmins Disk Editor. It's the fdisk and disklabel part
of sysinstall. So sysinstall may retire now, we have the important non-install part
of it covered.
ATM it doesn't understand GEOM stuff (like mirror, stripe, raid, ...), but patches
to change this and to clean it up internally are more than welcome.
netchild [Mon, 7 Aug 2006 22:44:01 +0000 (22:44 +0000)]
"Workaround for sound lag in current snd_emu10kx driver. Real problem
is interaction between in-kernel sound buffer handling and hardware.
With small buffer, there are times when both harwdare reads and
kernel writes to the same buffer (it is only visible on slow machines, i
think). I'm digging in channel.c and buffer.c to find a solution that
allow use of large hardware buffers without sound lags - hardware can
handle buffers up to 32Mb."
phk [Mon, 7 Aug 2006 20:12:18 +0000 (20:12 +0000)]
Return length from fwopen() file callback instead of zero.
The symptom is that syslog() fails to log anything but the "ident"
string if LOG_PERROR is specified to openlog(3) and the extensible
printf is in action.
For unclear, likely quaint historical reasons, syslog uses fwopen()
on a stack buffer, rather than using the more straightforward
and faster snprintf().
Along the way, fflush(3) is called, and since the callback writer
function returns zero instead of the length "written", __SERR
naturally gets set on the filedescriptor.
The extensible printf, in difference from the normal printf refuses
to output anything to an __SERR marked filedescriptor, and thus
the actual syslog message is supressed.
jhb [Mon, 7 Aug 2006 19:52:30 +0000 (19:52 +0000)]
When a user uses a hint to specify the IRQ for a link device, accept IRQs
that aren't listed as valid in the link device's set of possible IRQs.
This allows the hints to be used to work around broken BIOSes that don't
specify the correct ste of possible IRQs. A warning is issued in the
dmesg in this case to be consistent with the $PIR handling code.
yar [Mon, 7 Aug 2006 16:05:55 +0000 (16:05 +0000)]
- Improve and extend mark-up.
- Don't use full path in .Nm (we just don't do that).
- Correct some frivolous and poorly rendering language,
such as using possessive case for .Nm or .Fl .
- Use the same capitalization for "user ID" as in setuid(2) and getuid(2).
- Bring SEE ALSO in accord with the text.
glebius [Mon, 7 Aug 2006 14:17:05 +0000 (14:17 +0000)]
Add line edit and history support to ngctl(8) via editline(3).
Details:
- The main thread runs editline(3) functions, that can block.
- A separate thread is launched to monitor netgraph sockets.
- The access to the descriptors is protected by a mutex. At
runtime the monitoring thread owns the mutex. When the main
thread reads a command from el_gets() it asks the monitoring
thread to release a mutex and sleep until the main thread
processes the command.
This makes ngctl(8) depend on libedit, and libpthread. Thus, the
new functionality isn't compiled in if release is being built
with -DRELEASE_CRUNCH.
rwatson [Mon, 7 Aug 2006 12:02:43 +0000 (12:02 +0000)]
Move definition of UNIX domain socket protosw and domain entries from
uipc_proto.c to uipc_usrreq.c, making localdomain static. Remove
uipc_proto.c as it's no longer used. With this change, UNIX domain
sockets are entirely encapsulated in uipc_usrreq.c.
delphij [Mon, 7 Aug 2006 10:29:18 +0000 (10:29 +0000)]
Update NetBSD and OpenBSD SCM tags to match the reality. Note that
NetBSD revisions 1.8 and 1.9 are not actually applied to our code base
because we have solved the problem differently, therefore, these changes
can be safely skipped.
yar [Mon, 7 Aug 2006 07:28:47 +0000 (07:28 +0000)]
Fix things I misadvised to Nate Lawson:
- "Ns No" is redundant, so reduce it to just "Ns";
- use Li to mark up CPU and system power states because here they are
just strings to be typed literally (add more such mark-up as well);
- the best practice of typesetting tells us to use an en-dash to
indicate a closed range; fortunately, groff_char(7) provides such a symbol.
In addition, consistently use a comma between independent clauses
coordinated by a conjunction.
Pointed out by: ru (mark-up part)
MFC after: 3 days
bms [Sun, 6 Aug 2006 12:01:42 +0000 (12:01 +0000)]
Add identifier for the Epson CX3650 all-in-one scanner function.
This enables the scanner function on these devices to be detected
and probed by uscanner(4), but only when ulpt is not loaded.
PR: usb/92462
Submitted by: Friedrich Volkmann
MFC after: 30 days
rik [Sun, 6 Aug 2006 11:06:35 +0000 (11:06 +0000)]
- Added ability to provide (optional) path to the kernel sources
- Fixed path for ${s}/conf/files.FOO and a note that it should be merged into
corresponding file to be able to compile the kernel
- Changed kernel configuration example with the driver: it is not produced by
copying Generic but by including it
- Changed from automatic module building to asking an user if it whants to
rwatson [Sun, 6 Aug 2006 10:43:35 +0000 (10:43 +0000)]
Improve commenting of vaccess(), making sure to be clear that the ifdef
capabilities code is there for reference and never actually used. Slight
style tweak.
alc [Sun, 6 Aug 2006 01:00:09 +0000 (01:00 +0000)]
Reduce the scope of the page queues lock in kern_sendfile() now that
vm_page_sleep_if_busy() no longer requires the caller to hold the page
queues lock.
njl [Sat, 5 Aug 2006 20:28:50 +0000 (20:28 +0000)]
Back out 1.272. The LAPIC timer conflicts with C2/3 on various systems,
and so users get hangs until interrupts are generated another way. We'll
have to find a way to make the 2 work together before re-enabling this by
default.
imp [Sat, 5 Aug 2006 18:22:11 +0000 (18:22 +0000)]
Use safe strlcpy rather than unsafe strncpy. After marcel's last fix,
there was still one overflow possible. strlcpy is faster anyway
because it doesn't unexpectedly zero the entire length of the string
when copying short strings....
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)
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.
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.
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.
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.
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.
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.
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).
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.