des [Wed, 5 Jun 2002 10:05:03 +0000 (10:05 +0000)]
First step towards SSL support: wrap connections in a 'struct connection'
which contains the socket descriptor, the input buffer and (yet unused)
SSL state variables. This has the neat side effect of greatly improving
reentrance (though we're not *quite* there yet) and opening the door to
HTTP connection caching.
This commit is inspired by email conversations with and patches from
Henry Whincup <henry@techiebod.com> last fall.
iedowse [Wed, 5 Jun 2002 08:11:28 +0000 (08:11 +0000)]
Oops, unbreak parsing of the `type' field in getasciilabel(). I had
changed a `goto' to a `continue' in revision 1.52, but it continued
the wrong loop.
jmallett [Wed, 5 Jun 2002 02:01:46 +0000 (02:01 +0000)]
A space cannot be a header string seperator it appears given the SUSv3
description of ps(1), which uses them. I question whether newline and tab
can be either, but I'm not touching them. Yet.
jmallett [Wed, 5 Jun 2002 01:36:30 +0000 (01:36 +0000)]
Returning NULL here if malloc(3) fails is silly, at this point in the codepath
we have't malloc(3)'d nearly as much as we probably will, so errx(3) away,
instead of waiting for something to fail yet again later on.
jmallett [Wed, 5 Jun 2002 01:33:54 +0000 (01:33 +0000)]
Remove an XXX comment that seems to be a tiny bit no longer pertinent. This
function seems to do the right thing, and is not a "stub", and whoever "marc"
is, he's had plenty of time to do "the real one", so don't wait around for
him any longer.
jhb [Tue, 4 Jun 2002 21:53:48 +0000 (21:53 +0000)]
Optimize the adaptive mutex spin a bit. Use a simple while loop with
simple reads (and on IA32, a "pause" instruction for each interation of the
loop) to spin until either the mutex owner field changes, or the lock owner
stops executing.
is (at least if you have fixed function alignment):
.file "z.c"
.text
.p2align 2,,3
.globl main
.type main,@function
main:
pushl %ebp
movl %esp, %ebp
pushl %edi
pushl %eax
movl x, %ecx
xorl %eax, %eax
shrl $2, %ecx
movl $foo, %edi
cld
rep
stosl
andl $-16, %esp
<-- the lower bits of `len' should be loaded
near here
testl $2, %edi <-- this seems to be meant to test the 2^1
bit in `len' (not alignment of the pointer
like it actually does). %edi is the wrong
register for holding the bits, since it is
still needed for the pointer.
je .L2
stosw
.L2:
testl $1, %edi <-- similarly for the 2^0 bit.
je .L3
stosb
.L3:
movl -4(%ebp), %edi
leave
ret
.Lfe1:
.size main,.Lfe1-main
.comm foo,400,32
.comm x,4,4
.ident "GCC: (GNU) 3.1 [FreeBSD] 20020509 (prerelease)"
This seems to only result in (len % 3) bytes not being cleared, since gcc
doesn't seem to use the builtin memset unless it knows that the pointer is
aligned. If %edi could be misaligned, then too many bytes would be set.
gad [Tue, 4 Jun 2002 03:40:24 +0000 (03:40 +0000)]
Change some "process id" variables from 'int' to 'pid_t', renaming some
of them to keep better track of which-is-which (multiple variables were
named 'pid'). Moved a global pid-variable into the only routine that
used it. Net result: fixes two compile-time warnings...
jhb [Mon, 3 Jun 2002 22:36:52 +0000 (22:36 +0000)]
Backout revision 1.2 since it didn't work and replace it with a fix that
actually does work. Ignore errors from kldload(2) if the errno value is
EEXIST. It would help if this return value were documented in the
kldload(2) manual page.
iedowse [Mon, 3 Jun 2002 22:09:04 +0000 (22:09 +0000)]
Use a per-device worker thread to avoid blocking in mdstrategy()
until the I/O completes. This fixes some easily reproducable deadlocks
that occur when using md(4) with GEOM.
jmallett [Mon, 3 Jun 2002 20:35:35 +0000 (20:35 +0000)]
Make the manpage consistent with the code on the subject of comments, as to
not change the code to always do the "GNU" thing, as it's possible people
rely on BSD m4(1) traditionally resetting comment characters in case of no
arguments to the changecom function.
PR: bin/17480 (I think this satisfies the problem report)
jhb [Mon, 3 Jun 2002 19:42:49 +0000 (19:42 +0000)]
Fix handling of the 'noError' variable. According to the code comments,
one can set the 'noError' variable to ignore any errors that occur for the
next command. However, the code was only unsetting 'noError' when an error
actually occurred, so if you set 'noError', the next command completed ok,
and the command after that failed, the second command's failure would be
ignored. This fixes this by performing the 'noError' check earlier and
then unsetting 'noError' after every command that is run.
jhb [Mon, 3 Jun 2002 19:39:28 +0000 (19:39 +0000)]
Add a 'mediaClose' script command to close the open media. An example use
would be to unmount the CD you installed from and prompt the user to
eject it before rebooting the machine.
Reimplement FILES support using bsd.files.mk with the
same set of features as in recently added bsd.incs.mk
(FILESGROUPS, accessibility from both bsd.prog.mk and
bsd.lib.mk, de-pessimized typical installation path,
etc.) New standard targets: buildfiles, installfiles,
and files (buildfiles + installfiles).
iedowse [Mon, 3 Jun 2002 12:06:49 +0000 (12:06 +0000)]
Call getmntinfo with MNT_NOWAIT to avoid hanging if any NFS servers
are down. Avoid trying to send RPCs to the pidXXX@machine names
used in the special amd(8) mounts.
PR: bin/6183
Submitted by: Petr Lampa <lampa@fee.vutbr.cz>