iedowse [Wed, 2 Mar 2005 02:30:08 +0000 (02:30 +0000)]
Use a signal-safe type for two variables that are used to synchronise
with a signal handler. This fixes a race condition introduced by
compiler reordering that caused dump to sometimes get stuck,
especially while dumping large filesystems.
brooks [Wed, 2 Mar 2005 00:58:05 +0000 (00:58 +0000)]
If we don't have /usr/sbin/mtree, try to mount /usr. We're only likely
to hit this case when /usr is remote and thus hasn't been mounted (since
you're supposed to have /var before mounting remote file systems).
Normal machines that don't have a /var for some reason will have /usr
already available because it's local.
marius [Wed, 2 Mar 2005 00:49:37 +0000 (00:49 +0000)]
- Fix braino introduced in rev. 1.17, unlike the X1032A (HME-ISP1040-combo)
and the X1034A (quad HME; QFE) cards the X1033A (single HME) don't have a
PCI-PCI-bridge so we can't rely on the PCI slot number being useable as
index for the network address to read from the VPD on the latter. Use
the end tag to determine whether it is a QFE VPD with 4 NAs and only use
the slot number as index in this case.
- Remove a useless check.
brooks [Wed, 2 Mar 2005 00:44:39 +0000 (00:44 +0000)]
Remove a number of entries from the distribution target that are
automaticly created at boot. There's no need to maintain a list of
files and permissions in multiple places. This also means binary
updates won't stomp on log files.
For the record, utmp is created in etc/rc.d/cleanvar, wtmp and lastlog
in etc/rc.d/var, and the reset via etc/rc.d/newsyslog.
brooks [Wed, 2 Mar 2005 00:40:55 +0000 (00:40 +0000)]
- Update etc/rc.d/newsyslog to FreeBSD standards and install it.
- Enable it by default, running newsyslog with -CN which creates files
that have the C flag specified in /etc/newsyslog.conf.
- Remove the "newsyslog -CC" call from etc/rc.d/var and the check for
newsyslog.
- Add the C flag to entries in /etc/newsyslog.conf that are currently
installed as part of the base system.
There are two effects from this change:
- Users who delete default syslog files to stop logging to them
will need to set newsyslog_enable=NO in rc.conf or remove the C
flag from those file in /etc/newsyslog.conf or they will come back
on the next boot.
- Diskless systems now create the same set of files that ordinary
systems have by default instead of every file in newsyslog.conf.
brooks [Tue, 1 Mar 2005 22:08:15 +0000 (22:08 +0000)]
- Remove the dependency of /usr/bin/touch by using "cp /dev/null <target>"
to create /var/log/lastlog.
- Also create /var/log/wtmp if missing.
- Attempt to create these files unless populate_var is NO rather then
only when /var is empty or populate_var=YES.
Pull up to ETHER_HDR_LEN before passing an mbuf to ether_input().
The bug was found by running ng_dummy(4) node configured with a
delay, in front of the ng_eiface(4) node.
bmah [Tue, 1 Mar 2005 18:34:12 +0000 (18:34 +0000)]
New release notes: LC_CTYPE files machine-independent, stack sizes
increased for libpthread and libc_r, new math functions (+MFC),
rtld(1) LD_LIBMAP (+MFC), telnet(1) +port number.
MFCs noted: gshsec(8), fsck(8) -n (also fixed a mistake...mentioned
the wrong program before), mkuzip(8), Heimdal 0.6.3, OpenSSL 0.9.7e
Also mentioned that upgrades to -CURRENT are only possible from 5.3 or
newer.
wpaul [Tue, 1 Mar 2005 17:21:25 +0000 (17:21 +0000)]
In windrv_load(), I was allocating the driver object using
malloc(sizeof(device_object), ...) by mistake. Correct this, and
rename "dobj" to "drv" to make it a bit clearer what this variable
is supposed to be.
Ooops. I will compile test before committing. The stackgap version
of kevent32 will be going away shortly, so this is temporary until
I commit the non-stackgap version.
glebius [Tue, 1 Mar 2005 13:14:33 +0000 (13:14 +0000)]
Add more locking when reading/writing to carp softc. When carp softc is
attached to a parent interface we use its mutex to lock the softc. This
means that in several places like carp_ioctl() we lock softc conditionaly.
This should be redesigned.
To avoid LORs when MII announces us a link state change, we schedule
a quick callout and call carp_carpdev_state_locked() from it.
glebius [Tue, 1 Mar 2005 12:36:07 +0000 (12:36 +0000)]
- Add carp_mtx. Use it to protect list of all carp interfaces.
- In carp_send_ad_all() walk through list of all carp interfaces
instead of walking through list of all interfaces.
harti [Tue, 1 Mar 2005 12:22:07 +0000 (12:22 +0000)]
VarParseLong: Create new else block for haveModifier. Move the call
to VarExpand down into the branches of the if as well as cleanup code.
Eliminate code that is now obviously dead.
glebius [Tue, 1 Mar 2005 11:31:06 +0000 (11:31 +0000)]
Replace NG_PARSE_APPEND() macro with ng_parse_append() function. Check
its return value and free resources if function returns error. Plug
several memory leaks with this change.
Submitted by: archie
Found by: Coverity Prevent analysis tool
imp [Tue, 1 Mar 2005 08:58:06 +0000 (08:58 +0000)]
Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in
preference to some random negative number to allow other drivers a
bite at the apple.
imp [Tue, 1 Mar 2005 07:50:12 +0000 (07:50 +0000)]
Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, return
BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx
both support so that xl will snarf them on up.
trhodes [Tue, 1 Mar 2005 05:48:37 +0000 (05:48 +0000)]
Add sysdoc, a small set of scripts which will parse a kernel binary and
modules to rip out the available sysctls. It will then produce a manual
page which may be installed with 'make install'. Currently typing 'make'
in the directory uses the default /boot/kernel files. To use a specific
directory, run sysdoc -k [location].
delphij [Tue, 1 Mar 2005 02:33:34 +0000 (02:33 +0000)]
Make an advise that a rebuild of fsck(8) is recommended for -CURRENT
after 20050220 due to the superblock summary recomputation change.
Also make a note about how to go back to the old behavior.
das [Tue, 1 Mar 2005 01:43:20 +0000 (01:43 +0000)]
- Split tests into three rough categories.
- Use fesetround() instead of fpsetround(), and add tests for
various rounding modes.
- Test that all NaNs generated are quiet.
Some of these tests won't pass until problems in vendor sources
(gdtoa and gcc) are fixed and new versions imported, but I
want to get these changes into the tree before I accidentally
blow them away again. :-(
das [Tue, 1 Mar 2005 01:43:05 +0000 (01:43 +0000)]
- Split the printfloat test into 11 individually wrapped and packaged
tests. (Buy 10, get one free!) The separate categories were
already there; they just weren't labeled.
- Use fesetround() instead of fpsetround(), since the former is
standard and implemented on all supported architectures. Add
tests for each rounding mode.
- Add additional tests for subnormals.
Some of these tests won't pass until problems in vendor sources
(gdtoa and gcc) are fixed and new versions imported, but I
want to get these changes into the tree before I accidentally
blow them away.
iedowse [Mon, 28 Feb 2005 21:06:14 +0000 (21:06 +0000)]
Save and restore the VGA state across a suspend-resume cycle. This
is particularly useful when VESA is available (either `options VESA'
or load the vesa module), as BIOSes in some notebooks may correctly
save and restore LCD panel settings using VESA in cases where calling
the video BIOS POST is not effective. On some systems it may also
be necessary to set the hw.acpi.reset_video sysctl to 0.
ru [Mon, 28 Feb 2005 21:05:30 +0000 (21:05 +0000)]
Add endianness support.
While version 4 entries are architecture-independent, we
also store old (version 3) entries in native byte order.
Also, the hash itself is created in a native byte order.
With this change, pwd_mkdb(8) can be used to cross-build
*pwd.db files for another architecture.
iedowse [Mon, 28 Feb 2005 20:40:44 +0000 (20:40 +0000)]
Add a missing bcopy() to make saving the VESA state actually work.
Also save the DAC state, increase the maximum save state size from
4k to 8k, and refuse to save the VESA state if the BIOS reports it
is larger than the maximum size we can handle.
It doesn't appear that anything currently uses this code, but it
turns out to be capable of restoring some notebook displays to a
working state after a suspend-resume cycle.
jhb [Mon, 28 Feb 2005 19:26:16 +0000 (19:26 +0000)]
Define the _mtx_assert() function prototype as well as the MA_* constants
if either INVARIANTS or INVARIANT_SUPPORT is defined so that kernel modules
that want to use mtx_assert() only need to define INVARIANTS.
harti [Mon, 28 Feb 2005 17:23:17 +0000 (17:23 +0000)]
VarParseLong: Move the initialisation of dynamic up which saves
an else clause. Move the assignment to the lengthPtr down to
just before the return statements.
yar [Mon, 28 Feb 2005 17:05:00 +0000 (17:05 +0000)]
Give a better advice on how to convert DOS text to UNIX text.
The former tip used `col -bx', which would not only discard
CR's, but also expand TAB's and remove BS'en. This effect is
not always wanted.
rwatson [Mon, 28 Feb 2005 14:04:09 +0000 (14:04 +0000)]
In bpf_setf(), protect against races between multiple user threads
attempting to change the BPF filter on a BPF descriptor at the same
time: retrieve the old filter pointer under the same locked region
as setting the new pointer.
tobez [Mon, 28 Feb 2005 12:46:53 +0000 (12:46 +0000)]
Increase usefulness of telnet(1) as a protocol tester. By prepending
"+" to the port number, disable option negotiation and allow
transferring of data with high bit set.
rwatson [Mon, 28 Feb 2005 12:35:52 +0000 (12:35 +0000)]
Update a comment describing bpf_iflist to indicate that the BPF interface
structures correspond to specific link layers, so the same network
interface may appear more than once.
glebius [Mon, 28 Feb 2005 11:54:36 +0000 (11:54 +0000)]
Fix tcpdump(8) on carp(4) interface:
- Use our loop DLT type, not OpenBSD. [1]
- The fields that are converted to network byte order are not 32-bit
fields but 16-bit fields, so htons should be used in htonl. [1]
- Secondly, ip_input changes ip->ip_len into its value without
the ip-header length. So, restore the length to make bpf happy. [1]
- Use bpf_mtap2(), use temporary af1, since bpf_mtap2 doesn't
understand uint8_t af identifier.
grehan [Mon, 28 Feb 2005 08:47:51 +0000 (08:47 +0000)]
- switch pcpu to a struct declaration ala amd64. It may be more efficient to
cache-align this struct, but that's a topic for a far-in-the-future
commit.
- eliminate commented-out reference to a non-existent pcpu field.
imp [Mon, 28 Feb 2005 01:27:24 +0000 (01:27 +0000)]
There were two calls to cardbus_do_cis when cardbus_do_cis changed,
yet I only changed one of them. So when we loaded drivers, we'd fail
to allocate resources correct.
This pointed out that we were doing the wrong thing when we failed to
attach a child. We released all the resources and almost deleted the
child. Instead, we should keep the resources allocated so when/if a
driver is loaded, we can go w/o having to allocate them. We use
pci_cfg_save/restore to restore the BARs with these resources.
This seems to fix the problems that we were seeing that I thought
might have magically gone away in the last revision of cardbus.c (but
really didn't).