imp [Tue, 10 Aug 1999 05:58:58 +0000 (05:58 +0000)]
Use the latest version of these files from OpenBSD.
1) Safty change from casper dik was added to OpenBSD's sources since I
grabbed them. milltert@openbsd.org
2) Split up strlcpy to improve efficiency of the common case.
milltert@openbsd.org
3) Cleanup of cross references for man page. {alex,aaron}@openbsd.org
alc [Tue, 10 Aug 1999 04:50:20 +0000 (04:50 +0000)]
vm_map_madvise:
Now that behaviors are stored in the vm_map_entry rather than
the vm_object, it's no longer necessary to instantiate a vm_object
just to hold the behavior.
wpaul [Mon, 9 Aug 1999 21:12:18 +0000 (21:12 +0000)]
Fix nexus_pcib_is_host_bridge() so that it detects my 486's PCI bus
correctly. It has the following code:
if (class != PCIC_BRIDGE || subclass != PCIS_BRIDGE_HOST)
return NULL;
My 486 has an Integrated Micro Solutions PCI bridge which identifies
itself as subclass PCIS_BRIDGE_OTHER, not PCIS_BRIDGE_HOST. Consequently,
it gets ignored. In my opinion, the correct test should be:
if ((class != PCIC_BRIDGE) && (subclass != PCIS_BRIDGE_HOST))
return NULL;
That way the test still succeeds because the chip's class is PCIC_BRIDGE.
Clearly it's not reasonable to expect all host to PCI bridges to always
have a subclass of PCIS_BRIDGE_HOST since I've got one that doesn't.
This way the sanity test should remain relatively sane while still allowing
some oddball yet correct hardware to work. If somebody has a better way
to do it, go ahead and tweak the test, but be aware that
class == PCIC_BRIDGE and subclass == PCIS_BRIDGE_OTHER is a valid case.
While I was here, I also added an explicit ID string for the IMS chipset.
I also dealt with a minor style nit: it's bad karma not to have a default
case for your switch statements, but the one in this routine doesn't have
one. The default string of "Host to PCI bridge" is now assigned in a
default case of the switch statement instead of initializing "s" with the
string before the switch and then not having any default case.
mpp [Mon, 9 Aug 1999 13:52:12 +0000 (13:52 +0000)]
Remove a reference to config(8) when IRQ 2 is remapped to IRQ 9.
Config(8) contains no documentation about this.
Fix the help for the PnP irq and drq commands. This one caused
me a bit of head scratching the other night while trying to get
a problematic PnP device configured properly.
bde [Sun, 8 Aug 1999 14:11:03 +0000 (14:11 +0000)]
Fixed all printf format errors reported by gcc -Wformat on i386's:
- %q -> %ll.
Fixed nearby errors not reported by gcc -Wformat on i386's:
- don't assume that the promotion of [u_]int64_t is [u_]quad_t.
- don't use signed formats for unsigned args.
bde [Sun, 8 Aug 1999 13:22:05 +0000 (13:22 +0000)]
Fixed all printf format errors reported by gcc -Wformat on i386's:
- %q -> %ll; don't assume that the promotion of off_t is quad_t; only
assume that off_t's are representable as long longs.
- printing of dev_t's was completely broken.
Fixed nearby printf format errors not reported by gcc -Wformat on i386's:
- printing of ino_t's and pointers was sloppy.
jkh [Sun, 8 Aug 1999 07:51:16 +0000 (07:51 +0000)]
The following simplifies newvers.sh somewhat and makes what(1) work with
kernels again, now that we're using EGCS/GCC 2.9+. This "here"
file is compatible with the Bourne shell and the Korn shell (incl. pdksh
and KSH93 from AT&T, which I do have), so it doesn't make newvers.sh
unportable, but makes it easier to modify in the future/read now.
bde [Sun, 8 Aug 1999 07:30:02 +0000 (07:30 +0000)]
Install c++filt in /usr/libexec/${OBJFORMAT}. The version that
was installed in /usr/bin normally got clobbered when objformat
was installed. Indirection through objformat is correct although
underscore handling is the only thing that differs for aout and
elf -- going through objformat is the easiest way to set c++filt's
underscore handling flag correctly.
stark [Sun, 8 Aug 1999 07:05:46 +0000 (07:05 +0000)]
Corrected mistake that was causing daemon to loop without serving
user requests. Note that nothing can be said about the value of 'user'
unless User != NULL.
grog [Sat, 7 Aug 1999 08:14:01 +0000 (08:14 +0000)]
Import RAID-5 code.
Add Cybernet copyright.
OK'd-by: Chuck Jacobus <chuck@cybernet.com>
update_plex_state:
If any subdisk in the plex is initializing, set the plex to
initializing state. This gets rid of the ugly corrupt/degraded/up
transitions which previously occurred.
Desired-by: Steve Taylor <staylor@cybernet.com>
sddownstate:
Add new function, used by checksdstate.
checksdstate:
Let sddownstate decide what status to return.
grog [Sat, 7 Aug 1999 08:13:23 +0000 (08:13 +0000)]
Import RAID-5 code.
Add Cybernet copyright.
OK'd-by: Chuck Jacobus <chuck@cybernet.com>
logrq: save device major and minor numbers to compensate for lost
dev_t.
launch_requests: Don't issue requests which are marked
XFR_BAD_SUBDISK. This may make things easier in bre().
bre:
Rearrange.
- Change some comments
- Recognize holes in plex structure. Formerly this could lead to
incorrect write to the plex. Return REQUEST_DEGRADED on a read
request, but carry on to the bitter end on a write request, and
mark the requests for the inaccessible subdisks with
XFR_BAD_SUBDISK.
- return REQUEST_EOF if the requested transfer goes beyond the end
of the plex. This is not an error, since other plexes may go
further into the volume address space.
build_read_request:
Handle REQUEST_DEGRADED returned from bre().
grog [Sat, 7 Aug 1999 08:07:05 +0000 (08:07 +0000)]
Remove code to accept partitions of type 'unused'. From now on, Vinum
will only accept partitions of type 'vinum'.
format_config: Use the new %q format option in kvprintf, thus getting
rid of some of the filthiest code I've written in a long time. Also
remove the lltoa() function.
With-great-thanks-to: peter
format_config: Accept the fact that a subdisk might not be attached to
a plex, and save the config correctly.
vinum_scandisk: Scan all slices on a drive with a Microsoft partition
table. Only look at the compatibility slice if nothing was found in
the Microsoft slices.
This change removes a frequently employed method of shooting
yourself in the foot: people would decide that the Vinum drives
belonged on their own slice, and they wouldn't be able to start the
subsystem after a reboot. Documentation updates to follow.
grog [Sat, 7 Aug 1999 08:05:46 +0000 (08:05 +0000)]
vinumopen: add code to open raw subdisks. This is now used to
initialize subdisks. Probably the plex-related subdisk type will die
a death.
vinumconfig.c:
Accept (and ignore) kernel state information in userland config
files. This saves a lot of error recovery and also makes it possible
to use the output of printconfig to create new configuration.
Remove checkdiskconfig(). It wasn't needed any more.
Start adding support for hot spare drives. You can't put anything on
them (yet).
Change message formats from %lld to %qd.
get_empty_sd: Initialize size to -1. Previously this was done in
config_subdisk, which is the wrong place.
start_config: set current drive, plex and volume to -1, thus stopping
update configurations from taking their defaults from old configs.
green [Sat, 7 Aug 1999 05:33:35 +0000 (05:33 +0000)]
We don't end up checking for a return value of EFAULT from the copyinstr()
in the pathname translation procedure. This proves fatal, and can be
easily fixed. This or a similar change needs to be committed to svr4_util.h
and ibcs2_util.h. I will update ibcs2_util.h, if noone else thinks of a
better way to do this, in the same manner. I will leave svr4 to the
respective maintainer.
This closes the problem of the only crash I've been able to produce as
a user recently, except for (currently not-in-the-source tree) fd
table sharing fixes. Thanks goes to pho for his stress-testers.
jkh [Sat, 7 Aug 1999 01:43:39 +0000 (01:43 +0000)]
Re-enable play-nice-with-DHCP option now that bpf is the default
in GENERIC. Now a dhcp-configured system will both install and boot
initially with proper interface configuration.
jkh [Sat, 7 Aug 1999 01:42:08 +0000 (01:42 +0000)]
Enable bpf by default. There was no significant dissention to my proposal
of 2 weeks ago that this be done, and anyone who wishes to make bpf more
selective according to securelevel or compile-time options is more
than free to do so.