julian [Fri, 5 Jun 1998 22:40:01 +0000 (22:40 +0000)]
Reverse the default sense of the IPFW/DIVERT reinjection code
so that the new behaviour is now default.
Solves the "infinite loop in diversion" problem when more than one diversion
is active.
Man page changes follow.
The new code is in -stable as the NON default option.
Changed the log() of "Out of mbuf clusters - increase maxusers" to a
printf() of "Out of mbuf clusters - adjust NMBCLUSTERS or increase
maxusers" so that the message is more informative and so that it will
appear in the kernel message buffer.
Moved limit frobbing (and the resulting limcopy()) that occurs for
accounting to the accounting function so that this isn't needlessly
done for some process exits.
Reviewed by: bde,phk
If we are out of mb_map space and we failed to m_reclaim() anything and
the alloc is not M_DONTWAIT, then panic with "Out of mbuf clusters".
Callers that specify M_WAIT can't deal with getting a NULL buffer, so this
is a more graceful failure than randomly page faulting in the socket code
or elsewhere.
jkh [Fri, 5 Jun 1998 16:50:45 +0000 (16:50 +0000)]
Add mtree to bootstrap targets now that peter has added a new
keyword to it which will otherwise call the next target to fall over
on transitioning systems.
peter [Fri, 5 Jun 1998 14:47:10 +0000 (14:47 +0000)]
Hands off my /usr/src and /usr/obj! If they are symlinks (since they are
hard coded into too many things), it's not nice to go and change /home/src
etc. This means they will be created if missing (so it shouldn't break
the releases), but won't touch them once they are changed.
peter [Fri, 5 Jun 1998 14:43:42 +0000 (14:43 +0000)]
Create a new flag, "nochange", which will specify that a directory is
to be created if it's missing, otherwise completely ignore it's modes and
owners. Primary intended targets: /usr/src and /usr/obj.
Adjust the 'not created: File exists' message to mention that it's a
directory that's the problem, otherwise it doesn't make sense.
I had created chown-style -L and -P flag to control logical/physical mode
(ie: whether symlinks were followed), but the nochange flag is enough to
get the blasted thing out of my hair so I took them back out.
dfr [Thu, 4 Jun 1998 17:04:44 +0000 (17:04 +0000)]
If the filesystem blocksize is less than the VM page size, use the generic
getpages code. This happens for filesystems with 4k pages on the alpha since
the normal alpha pagesize is 8k.
wpaul [Thu, 4 Jun 1998 15:37:05 +0000 (15:37 +0000)]
Darnit, that last commit was only supposed to change files in the
-current branch. I mistakenly checked out the 2.2.x rpc.ypxfrd into my
-current working directory. No harm done, but I got really confused
when I went to check out rpc.ypxfrd again and found the changes I
wanted to make were already there. (I'm going to fix the other 2.2.x
versions of the other programs in a minute.)
Anyway: protect errno in the signal handler, in the -current version
of rpc.ypxfrd this time.
peter [Thu, 4 Jun 1998 15:31:55 +0000 (15:31 +0000)]
Make the whereobj target print it's output without the overhead of
starting another make..
Besides, make -V is broken, since it will print unexpanded variables.
bde [Thu, 4 Jun 1998 06:26:23 +0000 (06:26 +0000)]
Don't use beforedepend; just put generated headers in SRCS. ldgram.h
was already put in SRCS by the general yacc rules. Putting ldemul-list.h
in SRCS fixes races in `make -jN' when .depend hasn't been made.
where beforedepend depends on something so that it is not initially
up to date, `make [-n] -j2 depend' causes `make' to wait for itself
to make beforedepend. This works fine without -n. The job to make
beforedepend has normally been started, and beforedepend is marked
as made when the job completes. However, with -n, the pseudo-job
for making beforedepend has normally completed, and in any case
there was no chance of beforedepend being marked as made. `make'
actually exited almost immediately with status 0 instead of waiting
forever.
bde [Thu, 4 Jun 1998 01:09:28 +0000 (01:09 +0000)]
Removed special rules for lex- and yacc- generated files. The general
rules work identically, except that they actually work if the yacc-
generated header somehow becomes out of date.
Fix my last commit which got caught in the cvs/cvsup cycle.
I'm told that I botched the tabs too. I'm not sure they are fixed now
because I find that rather tedious.
bde [Wed, 3 Jun 1998 12:30:10 +0000 (12:30 +0000)]
Force success of the probe (after doing it as before except in one
miscconfigured case) if the port is the console. This fixes several
bugs:
- if all sioprobe()s failed, then the console driver followed null
pointers in cdevsw[].
- if the sioprobe() for the console failed but another sioprobe()
succeeded, then init hung early when the console couldn't be
opened.
- it was silly for the console to not be there after printing boot
messages on it.
Bugs introduced by this are hopefully no worse than old ones caused
by forcing the success of the `cn' level probe.
bde [Wed, 3 Jun 1998 09:43:38 +0000 (09:43 +0000)]
Fixed a printf() arg botch in the previous commit.
Only complain about an irq mismatch in the probe if the configured
irq doesn't become active, and then print the bitmap of irqs that
became active (including clock irqs) instead of just the first
(not including clock irqs).
In the case of alpha (only), more than just libc needs to know that
NetBSD syscalls are being used, so spam all compiles with the define
that indicates this.
msmith [Wed, 3 Jun 1998 01:59:42 +0000 (01:59 +0000)]
If vm86 services are available, use these to perform the APM BIOS
probe and intialisation. This will ultimately remove the grubby (but
functional) hack that copies a real-mode function into low memory
early in locore.s.
jkh [Tue, 2 Jun 1998 12:38:31 +0000 (12:38 +0000)]
".. x11amp appears to be calling shmctl(id, IPC_RMID, 0) and the emulation
layer does not like the null shmid_ds buffer pointer. The emulation layer
returned an error without ever calling FreeBSD's shmctl, so the segments
were not being deleted when the reference count went to zero."
peter [Tue, 2 Jun 1998 12:00:08 +0000 (12:00 +0000)]
Treat an EOPNOTSUPP from fchflags() as a non-fatal case. Only warn about
it if flags were explicitly specified on the command line. Do not warn
if we were merely trying to preserve flags or remove UF_NODUMP. NFS does
not support flags.
I'm not sure that this is ideal, but it should do for now. Installing
a plain file onto a NFS server must work, we used to silently ignore the
attempt. Doing a binary install looses the flags anyway since cpio
doens't preserve them with the cdrom/network images.
XXX make world should not use flags or chown/chgrp in the obj/tmp area.
This is based on a suggestion from Ken Merry <ken@plutotech.com>.
phk [Tue, 2 Jun 1998 11:02:16 +0000 (11:02 +0000)]
Cut through the discussions and settle the issue: Everything in /var/run
is blown away at boot. If sudo or other programs needs directories, they
had better make them in /usr/local/etc/rc.d/mumble.sh
peter [Mon, 1 Jun 1998 13:00:32 +0000 (13:00 +0000)]
Seperate the Paul Kranenburg a.out rtld stuff into a stand-alone area away
from the gpl ld code. This is part 2 of something that I began in 1996.
A repository copy has happened behind cvs's back.
peter [Mon, 1 Jun 1998 11:32:53 +0000 (11:32 +0000)]
Make sure we go a nfs_fsinfo() in get/putpages before calling
readrpc/writerpc, since they assume it's already been done. This could
break if the first read/write access to a nfs filesystem was an exec() or
mmap() instead of a read(), write() syscall. (or statfs()).
nfs_getpages() could return an errno (EOPNOTSUPP) instead of a VM_PAGER_*
return code. Some layout tweaks for the get/putpages code.
peter [Mon, 1 Jun 1998 10:01:31 +0000 (10:01 +0000)]
Preset the maximum file size before we get to nfs_fsinfo(), based on
an (over?) conservative assumption about what the client can store in it's
buffer cache using a signed 32-bit 512-byte block number index. Otherwise
it's possible for some file access when maxfilesize = 0 (eg: /usr is nfs
mounted and doing an execve())
Pointed out by: bde
XXX It might make sense to do a preemptive nfs_fsinfo() call at mount time.