Bruce Evans [Wed, 11 Feb 2004 15:27:26 +0000 (15:27 +0000)]
Removed more vestiges of vfs_ioopt:
- rev.1.42 of ffs_readwrite.c added a special case in ffs_read() for reads
that are initially at EOF, and rev.1.62 of ufs_readwrite.c fixed
timestamp bugs in it. Removal of most of vfs_ioopt made it just and
optimization, and removal of the vm object reference calls made it less
than an optimization. It was cloned in rev.1.94 of ufs_readwrite.c as
part of cloning ffs_extwrite() although it was always less than an
optimization in ffs_extwrite().
- some comments, compound statements and vertical whitespace were vestiges
of dead code.
Thomas Quinot [Wed, 11 Feb 2004 10:14:08 +0000 (10:14 +0000)]
(atapi_cb): Reenable automatic retrieve of sense data on error, making
it asynchronous to avoid incorrect use of ata_atapicmd within an
ATAPI callback.
Added first part of GEOM kernel API manuals pages.
Documented function and macros are:
- DECLARE_GEOM_CLASS(),
- g_attach(),
- g_detach(),
- g_new_bio(),
- g_clone_bio(),
- g_destroy_bio(),
- g_new_consumer(),
- g_destroy_consumer(),
- g_read_data(),
- g_write_data(),
- g_post_event(),
- g_waitfor_event(),
- g_cancel_event(),
- g_new_geomf(),
- g_destroy_geom(),
- g_new_providerf(),
- g_destroy_provider(),
- g_error_provider(),
- g_provider_by_name(),
- g_wither_geom().
and more to come.
I want to thanks following people for help with those documents:
Slawek Zak <zaks@prioris.mini.pw.edu.pl>
Simon L. Nielsen <simon@FreeBSD.org>
Pieter de Boer <g.p.de.boer@st.hanze.nl>
and of course
Poul-Henning Kamp <phk@FreeBSD.org>
When restarting a transfer that has already completed, the server will
reply with a 416 error code (requested range not satisfiable) because
we ask it to start at the end of the file. Handle this gracefully by
considering a 416 reply a success if the requested offset exactly
matches the length of the file and the requested length is zero.
Ruslan Ermilov [Wed, 11 Feb 2004 08:42:38 +0000 (08:42 +0000)]
Get rid of unnecessary use of m4(1) by using cpp(1) instead.
(John tells me there were problems when trying this before,
but it appears to be safe these day.)
Peter Grehan [Wed, 11 Feb 2004 07:27:34 +0000 (07:27 +0000)]
Cleaned up param.h:
- culled long-dead #define's
- segment register defs moved to sr.h
- NPMAPS moved to pmap.h
- KERNBASE moved to vmparam.h
- removed include of <machine/cpu.h> and fixed src files that
relied on this.
Modifying segment register code no longer causes gcc rebuilds :-)
Tim Kientzle [Wed, 11 Feb 2004 05:44:20 +0000 (05:44 +0000)]
GNU tar in the base system is now called "gtar"
"tar" is now just a link to "gtar".
This lays the groundwork for an orderly migration
from GNU tar to some other tar. (First, we introduce
the new tar program, then we migrate the 'tar' name,
then we remove gtar, with intervals of months between
these steps.)
Bruce M Simpson [Wed, 11 Feb 2004 04:34:34 +0000 (04:34 +0000)]
Initial import of RFC 2385 (TCP-MD5) digest support.
This is the second of two commits; bring in the userland support to finish.
Teach libipsec and setkey about the tcp-md5 class of security associations,
thus allowing administrators to add per-host keys to the SADB for use by
the tcpsignature_compute() function.
Document that a single SPI must be used until such time as the code which
adds support to the SPD to specify flows for tcp-md5 treatment is suitable
for production.
Bruce M Simpson [Wed, 11 Feb 2004 04:26:04 +0000 (04:26 +0000)]
Initial import of RFC 2385 (TCP-MD5) digest support.
This is the first of two commits; bringing in the kernel support first.
This can be enabled by compiling a kernel with options TCP_SIGNATURE
and FAST_IPSEC.
For the uninitiated, this is a TCP option which provides for a means of
authenticating TCP sessions which came into being before IPSEC. It is
still relevant today, however, as it is used by many commercial router
vendors, particularly with BGP, and as such has become a requirement for
interconnect at many major Internet points of presence.
Several parts of the TCP and IP headers, including the segment payload,
are digested with MD5, including a shared secret. The PF_KEY interface
is used to manage the secrets using security associations in the SADB.
There is a limitation here in that as there is no way to map a TCP flow
per-port back to an SPI without polluting tcpcb or using the SPD; the
code to do the latter is unstable at this time. Therefore this code only
supports per-host keying granularity.
Whilst FAST_IPSEC is mutually exclusive with KAME IPSEC (and thus IPv6),
TCP_SIGNATURE applies only to IPv4. For the vast majority of prospective
users of this feature, this will not pose any problem.
This implementation is output-only; that is, the option is honoured when
responding to a host initiating a TCP session, but no effort is made
[yet] to authenticate inbound traffic. This is, however, sufficient to
interwork with Cisco equipment.
Tested with a Cisco 2501 running IOS 12.0(27), and Quagga 0.96.4 with
local patches. Patches for tcpdump to validate TCP-MD5 sessions are also
available from me upon request.
Nate Lawson [Wed, 11 Feb 2004 02:57:33 +0000 (02:57 +0000)]
Prefer buttons defined in the AML over the ones in the FADT. Some
systems define power/sleep buttons in both places but only deliver
notifies to the ones defined in the AML.
Also, reduce length of various function handler names.
Peter Grehan [Tue, 10 Feb 2004 23:57:35 +0000 (23:57 +0000)]
Correctly create interrupt key for PCI, which is the OpenFirmware
pci-hi/med/lo + node 'interrupts' property. This worked by
accident until recent notebooks required correct operation.
Bill Paul [Tue, 10 Feb 2004 23:01:53 +0000 (23:01 +0000)]
Add some bulletproofing: don't allow the ndis_get_info() or ndis_set_info()
routines to do anything except return error if the miniport adapter context
is not set (meaning we either having init'ed the driver yet, or the
initialization failed).
Also, be sure to NULL out the adapter context along with the
miniport characteristics pointers if calling the MiniportInitialize()
method fails.
Alan Cox [Tue, 10 Feb 2004 18:34:27 +0000 (18:34 +0000)]
Correct a long-standing race condition in the inactive queue scan. (See
the added comment for low-level details.) The effect of this race
condition is a panic "vm_page_cache: caching a dirty page, ..."
Peter Pentchev [Tue, 10 Feb 2004 15:12:01 +0000 (15:12 +0000)]
Document the '-h hostname' option, which seems to have been present
ever since rev. 1.1 of bootpd.c.
While I'm here, rearrange the synopsis a bit: sort the options and
clarify that -i and -s are mutually exclusive.
Reported by: Atanas Buchvarov <nasko@nove.bg>
MFC after: 3 days
Tim J. Robbins [Tue, 10 Feb 2004 05:53:02 +0000 (05:53 +0000)]
Fixes problems that occurred when a file was removed and a directory
created with the same name, and vice versa:
- Immediately recycle vnodes of files & directories that have been deleted
or renamed.
- When looking an entry in the VFS name cache or smbfs's private
cache, make sure the vnode type is consistent with the type of file
the server thinks it is, and re-create the vnode if it isn't.
The alternative to this is to recycle vnodes unconditionally when their
use count drops to 0, but this would make all the caching we do
mostly useless.
Tim Kientzle [Mon, 9 Feb 2004 23:22:54 +0000 (23:22 +0000)]
Initial import of libarchive.
What it is:
A library for reading and writing various streaming archive
formats, especially tar and cpio. Being a library, it should
be easy to incorporate into pkg_* tools, sysinstall, and any
other place that needs to read or write such archives.
Features:
* Full automatic detection of both compression and archive format.
* Extensible internal architecture to make it easy to add new formats.
* Support for "pax interchange format," a new POSIX-standard tar format
that eliminates essentially all of the restrictions of historic formats.
* BSD license
Thanks to: jkh for pushing me to start this work, gordon for
encouraging me to commit it, bde for answering endless style
questions, and many others for feedback and encouragement.
Status: Pretty good overall, though there are still a few rough edges and
the library could always use more testing. Feedback eagerly solicited.
Bruce Evans [Mon, 9 Feb 2004 21:48:51 +0000 (21:48 +0000)]
Added an option -ldi<N> to control indentation of local variable names.
The default is to be backwards compatible and non-KNF (use the same
indentation for locals as for globals; -ldi0 gives KNF indentation
for locals (none)). The indentation for globals also applies to struct
member names in local declatations. The indentation of variable names
in multi-line declarations is broken in various ways and this commit
gives some new variations.
indent.1:
Also clarified the description of -di<N>.
Bruce Evans [Mon, 9 Feb 2004 20:26:27 +0000 (20:26 +0000)]
Backed out a part of previous commit that wasn;t mentioned in the log
message and wasn't quite ready (it avoided indenting the names of local
variables).
Bruce Evans [Mon, 9 Feb 2004 15:57:35 +0000 (15:57 +0000)]
Fixed tab lossage in indented variable names. The -diN option was
worse than useless because it caused things like mangling of
"^int\tfoo" to "int foo" (this for N = 8). This quick fix breaks
the invariant that characters between s_code and e_code have width 1,
but nothing seems to depend on this.
Bruce Evans [Mon, 9 Feb 2004 15:27:02 +0000 (15:27 +0000)]
Fixed misformatting of "struct foo *bar" in function parameter lists. It
was mangled to "struct foo * bar". There should be an option to control
this, but no space is normal. This finishes fixing the bugs in rev.1.4.
indent(1) still doesn't really understand types in parameter lists. It
thinks keywords inside parentheses are for casts or sizeofs. This works
accidentally for scalar types and this quick fix makes it work similarly
but not so accidentally for struct/union/enum types.
Ruslan Ermilov [Mon, 9 Feb 2004 14:17:02 +0000 (14:17 +0000)]
MFi386.
- Factor out common settings and put them in an upper level Makefile.inc.
- Properly use PROG for real programs, not their products.
- Further reduce diffs to i386 versions.
Ruslan Ermilov [Mon, 9 Feb 2004 14:11:58 +0000 (14:11 +0000)]
- Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib
better, and has a notion of an "internal" program, use PROG
where possible. This has a good impact on the contents of
.depend files and causes programs to be linked with cc(1).
XXX: boot2 couldn't be converted as it's actually two programs.
Bruce Evans [Mon, 9 Feb 2004 13:13:03 +0000 (13:13 +0000)]
Expanded the size of the keyword table from 100 to 1000 entries so that
the number of typedef-names is not so limited. Same as in rev.1.4.
Added the "const" and "volatile" to the keyword table. Rev.1.4 added
these but they were misclassified so they were not formatted as types.
indent still doesn't really understand them. E.g., it mangles
"char * const *foo" and "char *const *foo". This change mainly stops
it mangling "char const foo" to "char<declaration-indent>const foo".
Bruce Evans [Mon, 9 Feb 2004 12:52:15 +0000 (12:52 +0000)]
Backed out rev.1.4 and 1.7 so they they can be implemented and committed
properly. Of the 3 changes mentioned in the log message for rev.1.4,
the first (implementing -[n]fcb) was correct but didn't touch this
file, the second (no-space-after-sizeof) was not actually done (it is
the default and is controlled by the undcoumented -[n]bs options), and
the third (no-space-after 'struct foo *') was very buggy and was reduced
to wrong comments and other style bugs by backing out the main part
of it in rev.1.6. Rev.1.4 had 2 changes which were not mentioned in
its commit log: expand specials[] so that more than -83 typedef-names
can be specified (this was the one working change in rev.1.4), and add
"const" and "volatile" to specials[] (this was buggy).
Ian Dowse [Mon, 9 Feb 2004 00:10:18 +0000 (00:10 +0000)]
Fix a typo that stopped ypset's -h option from working with a
hostname rather than an IP. The code was copying the pointer to the
IP address instead of the IP address itself. The bug has existed
ever since ypset was first imported in 1994.
Ian Dowse [Sun, 8 Feb 2004 23:08:53 +0000 (23:08 +0000)]
Further simplify the code for printing the message buffer:
- Ensure that the buffer ends with "\n\0" to avoid special cases
and allow the use of strtol().
- Use strvisx() on each complete line instead of character by
character.
Ian Dowse [Sun, 8 Feb 2004 21:59:17 +0000 (21:59 +0000)]
Certain ICMP error replies cause ping to perform a reverse DNS
lookup on an IP address from the packet (such as the IP that sent
a TTL exceeded error). If the DNS lookup takes a long time, ^C will
appear to be ineffective since the SIGINT handler just sets a flag
and returns. Work around this by exiting immediately on receipt of
a second SIGINT when DNS lookups are enabled.