des [Mon, 12 Oct 1998 20:36:33 +0000 (20:36 +0000)]
Avoid the "Cannot allocate memory" problem that appears on heavily
loaded systems by retrying the sysctl() with a larger buffer if it
fails with ENOMEM. For good measure, allocate 10% more memory than
sysctl() claims is necessary.
PR: 8275
Reviewed by: David Greenman <dg@freebsd.org>
dt [Mon, 12 Oct 1998 20:14:09 +0000 (20:14 +0000)]
UnVMIO vnodes of block devices when they are no longer in use. (Some
things, like msdosfs, do not work (panic) on devices with VMIO enabled.
FFS enable VMIO on mounted devices, and nothing previously disabled it, so,
after you mounted FFS floppy, you could not mount msdosfs floppy anymore...)
imp [Mon, 12 Oct 1998 18:53:33 +0000 (18:53 +0000)]
Fix breakage introduced by last patch. bde has added CC_QUIET flag to
hasseen_isadev so this will be less noisy when conflicts do exist.
Also eliminate redundant warnings about conflicts.
ken [Mon, 12 Oct 1998 17:16:47 +0000 (17:16 +0000)]
Add quirk entries to disable the synchronize cache command for Micropolis
2217's (reported by Matthew Jacob in NetBSD PR kern/6027) and Fujitsu
M2954's (reported by Tom Jackson).
Some of the Fujitsus at least hang when they get a cache sync command.
(Others just return illegal request.)
Also, make error printing in dashutdown() a little more selective. Don't
print any error when the sense key is illegal request. Drives that don't
support the synchronize cache command usually return illegal request.
Also, make sure the scsi status is check condition before going into
scsi_sense_print().
ken [Mon, 12 Oct 1998 16:32:32 +0000 (16:32 +0000)]
Fix a curses bug exposed by the ":numbers" display of systat -iostat.
This bug showed up when you had more than 3 devices displayed. (thus
requiring a second line of display)
Here's a quote From the PR:
When wrefresh() is called with a subwindow as argument, __set_subwin
might be called with reversed arguments if wrefresh() decides to calls
quickch(). This may cause use of negative array indexes, with a
resulting segfault.
Since quickch() manipulates the line structures belonging to curscr,
it looks like all subwindows of curscr should be updated.
PR: bin/8086
Submitted by: Tor Egge <Tor.Egge@fast.no>
bde [Mon, 12 Oct 1998 13:12:45 +0000 (13:12 +0000)]
Don't print conflict messages in haveseen_isadev() if CC_QUIET is
specified. This makes haveseen_isadev() useful for searching for a
free resource. This increases the bitrot in the pci RESOURCE_CHECK
code.
Fixed the pre-attach conflict message. The flag for distinguishing
pre-attach conflict checks from pre-probe ones was never set.
yokota [Mon, 12 Oct 1998 09:36:27 +0000 (09:36 +0000)]
Fix PnP mouse detection routine so that:
- it has longer timeout as per the PnP COM Device Specificaiton 1.0,
- and it tries to obtain the PnP ID string by strictly following the
specification and if it fails, by deploying slightly simplified
steps. (moused has used the simplified method because early PnP mice
do not exactly follow the specification. But now, recent mice
do not supply the ID string unless the strict procedure is used...)
peter [Mon, 12 Oct 1998 09:13:50 +0000 (09:13 +0000)]
Only print kernel entry point during load.
Drastically quieten down the verbose load progress messages. They were
more useful for debugging than anything, but are beyond a joke when loading
a few dozen modules.
Simplify the ELF extended symbol table load format. Just take the main
symbol table and the string table that corresponds. This is what we will
be getting local symbols from. (needed for the alpha stack tracebacks).
Use the (optional) full symbol tables in lookups. This means we have to
furhter distinguish between symbols that can come from the dynamic linking
table and the complete table.
The alpha boot code now needs to be adapted as ddb/db_elf.c cannot use
the simpler format.
I have not implemented loading the extended symbol tables from the syscall
interface yet, just for preloaded modules.
I am not sure about the symbol resolution. I *think* it's possible that
a local symbol can be found in preference to a global, depending on the
search sequence and dependency tree.
ken [Mon, 12 Oct 1998 03:27:51 +0000 (03:27 +0000)]
Update the cd(4) man page for the CAM cd driver.
This includes a description of the changer timeout kernel options and
sysctl variables. I didn't check to make sure the ioctl descriptions are
up to date; that will come sometime later. (The ioctls haven't changed in
the CAM driver, but I'm not sure if the man page was in sync with even the
old driver.)
des [Sun, 11 Oct 1998 22:44:32 +0000 (22:44 +0000)]
Add comments about Luigi's audio drivers. Luigi said he had a better
patch he'd commit if he could find it, but he hasn't done so so I'll
assume he didn't find it :)
alex [Sun, 11 Oct 1998 21:08:02 +0000 (21:08 +0000)]
Unregister the glibc2 brand at module unload time.
Change the ELF registration/unregistration scheme to be less error prone.
Adding a new brand requires a single addition to linux_brandlist instead of
modifying linux_load(), linux_unload(), and linux_elf_init().
jdp [Sun, 11 Oct 1998 19:40:38 +0000 (19:40 +0000)]
Fix the MS-CHAP support. The code was passing a bit count to
MD4Update(), but our version in libmd expects a byte count.
This code is not currently compiled or linked into pppd, so I'm
reasonably sure I didn't break anything. :-) I added the necessary
statements to the Makefile, but left them commented out because we
are in feature freeze. When the code is enabled, we must be careful
to build it only if the DES library is available.
jdp [Sun, 11 Oct 1998 19:22:07 +0000 (19:22 +0000)]
If an ELF executable has a recognized brand, then believe it.
Formerly, the heuristic involving the interpreter path took
precedence.
Also, print a better error message if the brand is missing or not
recognized. If there is no brand at all, give the user a hint that
"brandelf" needs to be run.
markm [Sun, 11 Oct 1998 18:13:42 +0000 (18:13 +0000)]
Very substantial debug/improvement of the FreeBSD/Perl5 build.
o make install ; make install now works
o make all ; make all is quiet the second time
o Dependancies are properliy debugged; this means that make -jN has a
far hihjer likelyhood of working.
o a proper 'link farm' has been constructed for the build. This
dramatically simplifies the dependancy tangle.
o for perldoc's use, all the .pod files are installed.
o the man3 docs are properly compressed.
o the man pages and libary code are installed by the makefiles, not
by a perl script.
o at the end, h2ph is run.
bde [Sun, 11 Oct 1998 16:33:02 +0000 (16:33 +0000)]
Fixed removing of obsolete shared libraries:
- the directory was wrong if ${SHLIBDIR} != ${LIBDIR}. It's still wrong
if the installation of the obsolete library was done before /aout was
appended to LIBDIR.
- the version would have become wrong when the default in ../Makefile.inc
is changed from 2.0.
- the comment mostly described moving of libraries to /usr/lib/compat, but
we don't do that.
peter [Sun, 11 Oct 1998 10:19:11 +0000 (10:19 +0000)]
Probe all consoles, not just the first. It doesn't make a lot of
difference, but might later on when we implement some sort of multi-head
console mode. Select a console after probing them all.
Don't strdup a potentially NULL return from getenv().
If we don't select an active console, choose the first regardless.
Call the console init function, at startup time and on a manual change.
The env_setenv() function needs EV_VOLATILE because it's pointing to
data that isn't malloc'ed and will cause a fault if it's freed later.
peter [Sun, 11 Oct 1998 10:07:52 +0000 (10:07 +0000)]
Only call vidc_init() once (unless forced).
Cosmetic change to the init-time character eater (like, make it increment
the index counter - if there's a problem, it would sit there in an infinite
loop instead of only running 10 times).
peter [Sun, 11 Oct 1998 10:05:13 +0000 (10:05 +0000)]
Fix comconsole mode. The int 0x14 read and status commands were reversed.
Also, make sure we set %dx each time around otherwise the commands
suddenly start trying to work on things like com92 instead of com1.
Make sure comc_init() is only run once.
Cosmetic change to init-time character eater.
peter [Sun, 11 Oct 1998 07:41:31 +0000 (07:41 +0000)]
Comment about libm and libmd being needed for some libraries.
Prompted by: bde
Also. Don't build & install legacy lkm's when NOLKM has been set.
Otherwise it gets built in the src tree rather than obj, because the
previous 'make obj' at the start of legacy-build does respect NOLKM.
dg [Sun, 11 Oct 1998 06:28:54 +0000 (06:28 +0000)]
Clear out transmit descriptor memory in fxp_attach when it's malloced.
fxp_stop is called as the first thing in fxp_init, and if the tx desc
list has junk in it, the system may panic. This bug showed up as a side
effect of the changes in rev 1.56, but has been in the code since the
beginning.
peter [Sun, 11 Oct 1998 04:56:03 +0000 (04:56 +0000)]
libg++ and libstdc++ also have internal calls to libm. Programs using the
shared versions should not need to add -lm unless the program uses libm
itself. Strictly speaking, libg++ depends on libstdc++, but libstdc++
has dynamic dependencies on some exception tables and binutils doesn't
seem to like it when a secondary library has undefined references. It
doesn't seem to care when -lstdc++ is added on the command line to ld
though. Anyway, the c++ driver adds -lstdc++ explicitly, so that should
be OK. c++ also adds -lm explicitly too, even though it wouldn't need
to now. [except for statically linked binaries as .a files don't have an
equivalent of automatic internal shared object dependencies.]
jdp [Sun, 11 Oct 1998 04:54:16 +0000 (04:54 +0000)]
Fix a couple of out-of-bounds array references in mapping between
Linux and FreeBSD signal numbers. Also, check signal numbers passed
in from application programs for validity. Without these checks,
it is trivial to panic the system from a Linux program.
peter [Sun, 11 Oct 1998 04:39:56 +0000 (04:39 +0000)]
Deal with /usr/lib/compat/aout, and that we've been installing things
in the wrong places for a while.
Also, the the libtermlib.so -> libtermcap.so manually for elf, otherwise
the hard link follows the symlink and the result looks rather wierd. The
*.a files are still hard linked under elf as before.
peter [Sun, 11 Oct 1998 04:21:56 +0000 (04:21 +0000)]
Don't build elf libresolv.so*, no elf freebsd binaries have used it ever.
Also, the a.out compat version is supposed to go into /usr/lib/compat/aout.
Try and clean up the mess left behind in /usr/lib/compat.
peter [Sun, 11 Oct 1998 04:18:30 +0000 (04:18 +0000)]
Don't install an elf libgnumalloc.so* in /usr/lib/compat.. No elf binaries
have been linked against it. Try and clean up the leftovers. Also, put
the a.out libs in /usr/lib/compat/aout since that's where the default
a.out ldconfig compat path points to.
gibbs [Sat, 10 Oct 1998 21:10:36 +0000 (21:10 +0000)]
If the bus delay is >= 2 seconds, notify the user that we are waiting
for devices to settle. This will hopefully allay any 'first installation'
fears that the machine has hung.
bde [Sat, 10 Oct 1998 19:30:45 +0000 (19:30 +0000)]
vfork -> fork. The child calls execl() which calls malloc(), so
vfork() can't be used. We could use alloca() in execl() so that
it can be called between vfork() and execve(), but a "portable"
popen() shouldn't depend on this. Calling execle() instead of
execl() should be fairly safe, since execle() is supposed to be
callable from signal handlers and signal handlers can't call
malloc(). However, execle() is broken.
bde [Sat, 10 Oct 1998 19:18:30 +0000 (19:18 +0000)]
vfork -> fork. This home made popen() had the same bug as the library
popen(), but worse. The child calls execvp(), which calls malloc()
a bit more than execl(), and it calls non-library functions that call
malloc() and who-knows-what else (stdio is called in at least some
error cases).
bde [Sat, 10 Oct 1998 14:02:07 +0000 (14:02 +0000)]
Fixed warnings for pointer versus int type mismatches. Addresses must
be converted to fixed-sized integers when they are passed across the
binary interface to the kernel.
bde [Sat, 10 Oct 1998 13:51:24 +0000 (13:51 +0000)]
Fixed warnings for pointer versus int type mismatches. Addresses must
be converted to fixed-sized integers when they are passed across the
binary interface to the kernel.
Didn't fix rotted bits (including not passing dosdev to the kernel and
serious out of dateness when initially committed).
eivind [Sat, 10 Oct 1998 13:31:32 +0000 (13:31 +0000)]
Remove the description of EBADF (that's an implementation detail if I
ever saw one), and move the description of NULL behaviour out to a
'NOTES' section, with an extra note that programs should not rely up
on it.
Kinda-approve-by: bde (by not replying to the mail with the diff)
bde [Sat, 10 Oct 1998 12:48:48 +0000 (12:48 +0000)]
Don't build or install ${MAN1}. It's just a copy of ${MAN1aout} and
installing it clobbers the elf ${MAN1}. The MAN1 -> MAN1aout changes
actually work now.