Bruce Evans [Sun, 16 Aug 1998 23:37:54 +0000 (23:37 +0000)]
Fixed printf format and spelling errors. Didn't fix related
description of DPT_SHUTDOWN_SLEEP in LINT. Didn't add timestamps
so that the (combined?) sleep interval can be printed as intended
in the original printf.
Bill Paul [Sun, 16 Aug 1998 17:14:59 +0000 (17:14 +0000)]
Import the (Fast) Etherlink XL driver. I'm reasonally confident in its
stability now. ALso modify /sys/conf/files, /sys/i386/conf/GENERIC
and /sys/i386/conf/LINT to add entries for the XL driver. Deactivate
support for the XL adapters in the vortex driver. LAstly, add a man
page.
(Also added an MLINKS entry for the ThunderLAN man page which I forgot
previously.)
John Polstra [Sun, 16 Aug 1998 03:03:38 +0000 (03:03 +0000)]
Revamp the ELF include files to better support architecture-independent
applications. Here's how it works.
The kernel should include <machine/elf.h> to get the definitions
for the native architecture. It can reference the various ELF
structures with generic names like Elf_Sym, Elf_Shdr, etc. A define
__ELF_WORD_SIZE is also available with the value 32 or 64 as
appropriate for the native architecture.
Generic applications should include <elf.h>, which is just a wrapper
for <machine/elf.h>.
Applications such as object file dumpers that need to deal with
foreign ELF files can include <sys/elf32.h> and/or <sys/elf64.h>.
Both can be included from the same source file if desired. The
structure names must be referenced using wordsize-specific names
like Elf32_Sym, Elf64_Shdr, etc.
I haven't change the alpha stuff, but I haven't broken it either.
Bruce Evans [Sun, 16 Aug 1998 00:41:40 +0000 (00:41 +0000)]
pmap.c:
Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to
(uintptr_t)(void *) (as would be more correct). Don't cast vm_offset_t's
to (u_long) just to do arithmetic on them.
mp_machdep.c:
Cast pointers to (uintptr_t) instead of to (u_long). Don't forget
to cast pointers to (void *) first or to recover from integral
possible integral promotions, although this is too much work for
machine-dependent code.
vm code generally avoids warnings for pointer vs long size mismatches
by using vm_offset_t to represent pointers; pmap.c often uses plain
`unsigned int' instead of vm_offset_t and didn't use u_long elsewhere,
but this style was messed up by code apparently imported from mp_machdep.c.
Bruce Evans [Sun, 16 Aug 1998 00:05:05 +0000 (00:05 +0000)]
Use an array of uintptr_t's instead of an array of u_longs to hold
address constants. This fixes some warnings for conversions from
64-bit integers to 32-bit pointers on i386's with 64-bit longs.
vm86 still uses too many u_longs.
Bruce Evans [Sat, 15 Aug 1998 23:06:38 +0000 (23:06 +0000)]
Cast to `char *' instead of to u_long to help add byte offsets to
pointers. Neither is portable, but "correct" casts to integral
types are much uglier - they lead to expressions like
Here the cast to the struct pointer is to match the surrounding
style of this file (and not depend on C's feature of properly
converting `void *' on assignment or cast), the `void *' casts are
because uintptr_t is only specified to work on `void *' pointers
(I missed this in about 100 lines of previous changes from [u]long
to [u]intptr_t), the outer cast to a uintptr_t is in case the
addition promoted the type, and the inner cast to a uintptr_t
corresponds to the one cast to an integer in the original code.
Bruce Evans [Sat, 15 Aug 1998 22:29:43 +0000 (22:29 +0000)]
Oops, the previous fix confused Linux's sigset_t with a pointer type.
It can be integral or a struct in POSIX, so it is difficult to print,
but it is actually declared as unsigned long. Assume that it is
unsigned integral.
Bruce Evans [Sat, 15 Aug 1998 21:51:53 +0000 (21:51 +0000)]
Made some disgusting ifdefs even more disgusting to enable the support
for `u_long cmd' ioctl args if __FreeBSD_version >= 300003. Some ioctls
were broken on machines with 32-bit ints and 64-bit longs.
I have added the support for BIG5 encoding into libc/libxpg4/mklocale.
the diff is attached below. This is done on the 3.0 source-tree.
I have test this on 2.2-stable before, but I don't have a 3.0 machine
right now.
This patch is mainly to make libc support BIG5 encoding, thus add
zh_TW.BIG5 locale to 3.0.
Doug Rabson [Sat, 15 Aug 1998 12:12:22 +0000 (12:12 +0000)]
Add an alpha machdep for kvm. The vatop functions are stubbed out for
now (mainly because I haven't ported them from the NetBSD crash dump
environment).
Doug Rabson [Sat, 15 Aug 1998 10:07:33 +0000 (10:07 +0000)]
Use explicitly sized types when laying out the cylinder groups. This
bug was the cause of the 'freeing free frag' panics that people have been
seeing with FreeBSD/alpha. I have a similar patch to newfs but I've not
finished testing it.
John Birrell [Sat, 15 Aug 1998 07:15:51 +0000 (07:15 +0000)]
Make the locally built and executed build tools in this directory
static to avoid them trying to use shared libraries before we're
ready. During the initial elf buildworld, the shared loader only
exists in the obj tree, so it can't be used.
In /etc/rc.network, near line 242, setting up Kerberos,
variable "stash_flag" is set. A few lines later, it is evaluated
as "stash_flags" with a trailing "s", and then a bit later the
singular version is unset.
PR: 7609
Reviewed by: phk
Submitted by: Walt Howard <howard@ee.utah.edu>
/usr/src/usr.bin/lex/Makefile puts FlexLexer.h into /usr/include/g++,
but flex still generates "#include <FlexLexer.h". As a result,
C++ sources flex generates failed to be compiled.
/usr/sbin/spkrtest and /usr/sbin/vidfont (aka kbdmap) use very
predictable /tmp files (static prefix + process number) which are
overwritten blindly, and follow links.
These workarounds change it from a process number to a very random
(9999 with tons of decimal places) number.
PR: 7565
Submitted by: Thomas Stromberg <tstrombe@rtci.com>
A long time ago, in a galaxy far, far away, someone made the (bonehead)
decision to limit the sound driver to one device. With Luigi's pcm
driver, the unit number for the PnP detected cards is nearly always 1,
and so you can't create the symlinks that will make your sound work.
PR: 7564
Submitted by: Doug White <dwhite@resnet.uoregon.edu>
Peter Hawkins [Fri, 14 Aug 1998 03:18:32 +0000 (03:18 +0000)]
Submitted by: Peter Hawkins <thepish@FreeBSD.org>
Add functionality for support for more than 4 subfields within gcos. chsh,
chpass etc did not parse beyond the 4th field previously and so truncated
gcos on updating the database.
Bruce Evans [Thu, 13 Aug 1998 19:03:22 +0000 (19:03 +0000)]
Cleaned up previous commit, mainly by moving repetitive calculations
of invariants to cyattach().
Fixed minor bugs:
- cyparam() returned without restoring the ipl in the error cases. This
was harmless because cyparam() is always called at spltty().
- one check for "rev. J or higher" actually checked for precisely rev. J.
Bruce Evans [Thu, 13 Aug 1998 13:54:10 +0000 (13:54 +0000)]
Updated for not-so-new version of Cyclom-Y boards (with 60MHz clock and
swapped RTS/DTR). Merge the vendor's modification of the 2.2.6-release
version into -current for reference. Will be cleaned up in next commit.
Bill Paul [Wed, 12 Aug 1998 22:51:59 +0000 (22:51 +0000)]
One-liner: add a call to the underlying device driver's SIOCDELMULTI
ioctl() routine at the end of if_delmulti() so that interfaces with
hardware multicast filtering can update their filters in a timely
manner.
If the interface doesn't support hardware multicast filtering, then
reception of multicast frames is done using 'promiscious mode' or
'capture all multicast frames' mode and software filtering in the
kernel. In this case, it doesn't matter if if_delmulti() ever does
an SCIODELMULTI on the interface or not: if MULTICAST support is
enabled, then we join the 'all hosts' group when the interface is
configured, and remain in it until the interface is brought down.
Without hardware filtering, joining one group means joining all
groups, so it makes no difference if we call the SIOCDELMULTI
routine.
If the interface does support hardware multicast filtering, then
by not reprogramming the hardware filter in if_delmulti(), we have
to wait until somebody calls if_setmulti(), during which time the
interface is receiving frames for multicast groups in which we are
no longer interested.
Mike Smith [Wed, 12 Aug 1998 21:42:54 +0000 (21:42 +0000)]
"The releaseing of the reference and lock is not temporary and belongs
where it is. The reference and lock(s) are acquired just above the
code in VREF() and relookup()."
Submitted by: Michael Hancock <michaelh@cet.co.jp>
John Polstra [Wed, 12 Aug 1998 20:29:29 +0000 (20:29 +0000)]
Add missing initialization of the length variable passed to
getsockopt(). Use a separate variable for clarity, instead of
overloading an unrelated variable.
Bruce Evans [Wed, 12 Aug 1998 17:38:09 +0000 (17:38 +0000)]
Synced with dgb.c. Important changes from 1.29 (ioctl handling
was broken), 1.30 (COMPAT_43 option header was missing), 1.31 (DEVFS
option header was missing), 1.33 (garbage pointers were followed
in debugging code). Cosmetic changes from 1.27, 1.32, 1.36, 1.37.
Of course, the DEVFS code didn't even compile. Fixed. Not tested.
Forgotten by: brian
This file should not exist. It is the same as dgb.c except for lots of
renamed variables, about 250 lines removed, and only about 100 lines of
real differences.
Bruce Evans [Tue, 11 Aug 1998 19:08:42 +0000 (19:08 +0000)]
Fixed printf format errors (ntohl() returns in_addr_t = u_int32_t != long
on some 64-bit systems). print_ip() should use inet_ntoa() instead of
bloated inline code with 4 ntohl()s.
Brian Somers [Tue, 11 Aug 1998 18:59:36 +0000 (18:59 +0000)]
Be careful about using ``.Bd -literal'' as groff sometimes keeps
the `-literal' after the closing .Ed.
Where this happens, use ``.Bd -unfilled'' with ``.It Li'' to dodge
the problem - it looks better too.
Problem reported by: Dom Mitchell <dom@phmit.demon.co.uk>