unix-history/.git
31 years agoMakefile clean up for groff failing make depend and tags
Rodney W. Grimes [Tue, 30 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Makefile clean up for groff failing make depend and tags

Added special make depend and make tags rules to parts of
groff so that they are nops.

AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00120

31 years agoMakefile clean up for gcc failing make depend
Rodney W. Grimes [Tue, 30 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Makefile clean up for gcc failing make depend

Added special make depend rule due to needing to create some
symbolic links for config.h before you can run make depend.

AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00119

31 years agoMakefile clean up for libg++ failing make depend
Rodney W. Grimes [Tue, 30 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Makefile clean up for libg++ failing make depend

Added CFLAGS so that include files could be found by mkdep,
and so that make depend would invoke the g++ version of cpp.

This also requires some changes in /usr/share/mk files to
support the now valid -+ CFLAG for make depends.

AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00118

30 years agoAdds vmstat/iostat kernel support and more verbose device probe info
Phil Sutherland [Sun, 8 Aug 1993 00:00:00 +0000 (00:00 +0000)]
Adds vmstat/iostat kernel support and more verbose device probe info
Fix config so that you can have devices without irqs

This patch adds the symbol names to icu.s that vmstat expects
the interrupt counters to be called.  It also adds code to config
so that the names of the interrupts are written at the end of vectors.s
so vmstat can report real device names.  It also cleans up and enables
the logging of stray interrupts.  The counters for false interrupts
are added but the fix for them is not (the fix I have is not done
very good.) A false interrupt is when a device asserts it's interrupt
signal, then removes it before the 8259 can latch it.  This is the number
one cause of stray IRQ7's and IRQ15's.

Additional device probe information is now printed.  This includes
ending I/O address (many drivers do not return the correct value from a
probe this still needs to be fixed), memory address and size, driver
flags passed in by config.

It is now possible to configure devices that do not use an irq,
this is especially handy for the new lpa driver.

During a boot from floppy the system now asks for a root floppy
disk.  Also now reports root on sd0a when new SCSI code is used.

NOTE: The source for vmstat and iostat are added by other patches.

AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com) (vmstat/iostat, probe)
AUTHOR: Phil Sutherland (philsuth@mycroft.dialix.oz.au) (config no irqs)
AUTHOR: (???@sun-lamp) (autoconf.c add support for floppy swap)
386BSD-Patchkit: patch00117

31 years agoAdd the source code for bugfiler from the Net/2 tape
Rodney W. Grimes [Sun, 4 Apr 1993 00:00:00 +0000 (00:00 +0000)]
Add the source code for bugfiler from the Net/2 tape
Add the source code for uucpd from the Net/2 tape

This patch adds the source code for the bugfiler program from
the Net/2 release tape.

This code was modified to use the bugfiler daemon that is being
maintained by me (Rodney W. Grimes) at bsd.coe.montana.edu.  I would like
to thank Nate for the use of his machine to mantain the bug achive on for
386bsd.  There is also a backup system of the bugfiler running on
sun-lamp.cs.berkeley.edu provided by Chris.

AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00116

31 years agoAdd missing splx calls to wd driver
Charles Hannum [Sun, 28 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Add missing splx calls to wd driver

Guido van Rooij & Charles Hannum noticed this one.  Subject line says
it all.

AUTHOR: Charles Hannum
386BSD-Patchkit: patch00115

31 years agoAdd tcpdump and tcpslice source code to /usr/src/contrib
David Greenman [Wed, 24 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Add tcpdump and tcpslice source code to /usr/src/contrib

This patch adds the source code for tcpdump and tcpslice to
/usr/src/contrib.  These are based upon the 2.2.1 release of bpf.

The source code has been reworked into the standard bsd source
code tree format, new Makefiles have also been written.  This is being
added to the source tree as it is highly kernel dependent and this is
the version that matches the current 386bsd kernel.

NOTE: The patch for the top level makefile (/usr/src/Makefile)
is being delayed for a latter patch, thus there will be one large patch
to this file, instead of many small patches.

AUTHOR: David Greenman (davidg@implode.rain.com)
AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00114

31 years agoAdd the microtime routines, add dcf clock support fixes
Poul-Henning Kamp [Sat, 15 Aug 1992 00:00:00 +0000 (00:00 +0000)]
Add the microtime routines, add dcf clock support fixes

This patch makes the microtimer kernel routines work correctly
so that you can get more precise timestamps from gettimeofday().

It also adds the necessary fixes to be able to install and
use the dcfclock driver.  The driver must be obtain from Poul-Henning Kamp
at this time, as it is still considered in test.  All that you need though
is the driver file itself, all the other changes have been incorporated into
the patchkit.  This should also increase the accuracy of the XTAL clock due
to Poul-Henning Kamp's other clock fixes.

NOTE: The update for files.i386 is in a seperate patch so that it
could be combined with the new device support patch.

AUTHOR: Sean Eric Fagan (sef@moria.cygnus.com) (microtime support)
AUTHOR: Poul-Henning Kamp (phk@data.fls.dk) (dcfclock support)
386BSD-Patchkit: patch00113

31 years agoBPF kernel support for slip and if_we drivers
David Greenman [Wed, 24 Mar 1993 00:00:00 +0000 (00:00 +0000)]
BPF kernel support for slip and if_we drivers

This patch allows you to build a kernel with psuedo-device bpf
that works correctly.  These are not fixes of the original bpf code
as shipped with 0.1, but are based upon tcpdump.2.2.1, which was the
lattest version of tcpdump availiable at the time this work was done.

There are major changes to the if_we driver.  These changes include
fixes for trailer protocol support (it now really works), cleaned up ring
buffer to mbuf routines, now enters promiscous mode when ioctl is called
instead of being delayed until the next time weinit is called.

NOTE:
The source code to tcpdump and tcpslice and the manual pages for bpf
will be added by another patchkit patch.  There were fixes made to the
bpf-package.386bsd.tar.Z that David Greenman put togeather: fixed SLMTU back
to the stock value of 296, update call to selwakeup so that a pid_t is passed
instead of a pointer to a proc structure)

AUTHOR: David Greenman (davidg@implode.rain.com)
AUTHOR: Marc Frajola (marc@escargot.rain.com)
AUTHOR: Rodney W. Grimes(rgrimes@agora.rain.com)
386BSD-Patchkit: patch00112

31 years agoAdd the source code for fdisk, quotacheck, and mount_pcfs to sbin
Julian Elischer [Sun, 4 Apr 1993 00:00:00 +0000 (00:00 +0000)]
Add the source code for fdisk, quotacheck, and mount_pcfs to sbin

This patch adds the source code for the fdisk program that Julian
Elischer wrote.  Includes manual pages and lattest bug fixes as of 4/4/93.

This patch adds the source code for the quotacheck program from
the Net/2 release tape.  There are 2 uninitialized variables in the Net/2
code.  dev_bsize is initialized in the wrong place; this bug only shows
itself if quotacheck is run on more than one disk partition.

This patch adds the source code for the mount_pcfs program that
is part of the pcfs package by Pual Popelka.

AUTHOR: Julian Elischer (???) (fdisk)
AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com) (Net/2 quotacheck)
AUTHOR: Paul Popelka (paulp@uts.amdahl.com) (mount_pcfs)
AUTHOR: Kent Talarico (kent@shipwreck.tsoft.net) (Net/2 quotacheck fixes)
386BSD-Patchkit: patch00111

31 years agodump not mapping last inode in fs
Keith Bostic [Sun, 28 Mar 1993 00:00:00 +0000 (00:00 +0000)]
dump not mapping last inode in fs

Patch line pretty much says it all.  This bug is forwarded from the 4.4
development team.

AUTHOR: Keith Bostic
386BSD-Patchkit: patch00110

31 years agoFIX VARIOUS LIBC NITS
Branko Lankester [Tue, 2 Mar 1993 00:00:00 +0000 (00:00 +0000)]
FIX VARIOUS LIBC NITS

The return value from memccpy() is wrong, according to the manpage.
This fixes it.  Also, fseek() inherited a bug from BNR2.  Fixed.

AUTHOR: Rog Egge & Branko Lankester
386BSD-Patchkit: patch00109

31 years agoFix bogus value for endp in strtod(), remove warnings.
Jordan K. Hubbard [Sun, 28 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Fix bogus value for endp in strtod(), remove warnings.

The value of endp returned by strtod() was off by one.  There was also a
const char * vs char * assignment that I took the opportunity to fix.

AUTHOR: Jordan K. Hubbard
386BSD-Patchkit: patch00108

31 years agoFix to ar(1) and ranlib(1) for odd-length symbol names > 16 chars.
Ken Hughes [Sun, 28 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Fix to ar(1) and ranlib(1) for odd-length symbol names > 16 chars.

This is a patch for ar(1) and ranlib(1) which fixes a problem for object
modules names longer than 16 characters and odd in length.  The problem
was that such records are padded to make sure the next record started on
an even byte boundary, but during reads the padding character was forgotten,
resulting in an "Inappropriate file type or format" error.

This patch should not affect reading of archive files which were created
correctly with the earlier version.

AUTHOR: Ken Hughes
386BSD-Patchkit: patch00107

31 years agoFix contiguous allocation glitch.
Chris Torek [Sun, 28 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Fix contiguous allocation glitch.

386BSD inherits a bug from the 4.3 Reno port for contiguous block allocation.
This fixes it.

AUTHOR: Chris Torek
386BSD-Patchkit: patch00106

31 years agoDon't increment version number twice, include kernel name in version
Charles Hannum [Sun, 28 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Don't increment version number twice, include kernel name in version

Pretty self-explanatory:  The version number was getting updated twice
and it's nice to have the kernel identify itself by name.  This patch
addresses these two problems.

AUTHOR: Kent Talarico and Charles Hannum
386BSD-Patchkit: patch00105

31 years agoOPTIMIZED VERSION OF in_cksum.c FOR I386
Bakul Shah [Fri, 24 Jul 1992 00:00:00 +0000 (00:00 +0000)]
OPTIMIZED VERSION OF in_cksum.c FOR I386

This patch optimizes the internet checksum routine.  It has been claimed
to increase TCP/IP speeds by a factor of 1.2 to 10.  Your mileage may vary.

AUTHOR: Bakul Shah (bvs@bitblocks.com) & Rodney Grimes [Assembly]
386BSD-Patchkit: patch00104

31 years agoFIXES MANUAL PAGES FOR file AND magic COMMANDS
Rodney W. Grimes [Wed, 10 Mar 1993 00:00:00 +0000 (00:00 +0000)]
FIXES MANUAL PAGES FOR file AND magic COMMANDS

The manual page nroff sources for the file and magic command got munched
by mail or somesuch tool at one time.  All of the nroff commands had two
dots on them instead of one.  This patch corrects that.  The problem was
pointed out on the net and is in one of the buglist as bug MISC002.

AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00103

31 years agoALLOW SELECTION OF 3COM 3C503 AUI/BNC FROM IFCONFIG
Herb Peyerl [Wed, 10 Mar 1993 00:00:00 +0000 (00:00 +0000)]
ALLOW SELECTION OF 3COM 3C503 AUI/BNC FROM IFCONFIG

Herb Peyerl:
There have been questions about the configuration of the AUI/BNC
connectors on the 3Com 3c503 card.  The way the selection is made is to
check for IFF_LLC0 being set in the "ifnet" struct.  If set, the driver
uses AUI, else BNC.  The ifconfig program now allows the following syntax:

ifconfig ec0 inet $hostname aui

ifconfig ec0 inet $hostname bnc

Default with no options yields BNC operation.

Rodney Grimes:
Added llc[0-2] and -llc[0-2] and MORE OUTPUT BITS TO IFCONFIG

AUTHOR: Herb Peyerl (hpeyerl@novatel.cuc.ab.ca
AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00102

31 years agoAdds fixed up /usr/src/share
Andy Valencia [Wed, 10 Mar 1993 00:00:00 +0000 (00:00 +0000)]
Adds fixed up /usr/src/share

This patch adds many manual pages to /usr/src/share, including
the new manual pages for bpf, pcfs and spkr.  And most of the other parts of
/usr/src/share from the etcdist.  A lot of cleanup work went into fixing
the etcdist stuff when it was moved.

A revised set of /usr/src/share/mk files is included that fixes
things like support for c++ files in make depend, make cleandir now removes
.depend, tags and the obj link/dir.  Added missing bsd.own.mk.  Added COPY
option to all install commands so you can turn one nob and get either
install -c or install.

Fixed the manual page for tp.4, it had a \(*e (epsilon) character
request that mandoc did not grock, so I replaced it with the word epsilon.

Rodney Grimes about Andy Valencia's fix:
This is a patch based upon Andy Valencia's patch to
/usr/othersrc/share/man/makewhatis.sed.  It REALLY fixes man -k.

NOTE: This patch upgraded at patchkit 0.2.3 to fix usr.share vs share and
add much more of /usr/src/share.  Still did not move dict, doc and misc as
they are rather large.

NOTE: Some of these man pages are seriously out of date and need to
be rewritten.  Also there are no device manual pages for the i386
architecture.  There are many man pages for the vax, tahoe and hp300
that could be edited into man pages for the i386, such as autoconf(8).
I did not include any of the other architectures in this patch, only
the i386 files.

AUTHOR: Andy Valencia (ajv@csd.mot.com) (makewhatis.sed fixes)
AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com) (all other fixes)
386BSD-Patchkit: patch00101

31 years agoDISABLE CHECKSUM FOR WD CLONES, FIX MULTIBOARD ROUTING, ADD 16 BIT XFER
Barry Lustig [Sun, 20 Sep 1992 00:00:00 +0000 (00:00 +0000)]
DISABLE CHECKSUM FOR WD CLONES, FIX MULTIBOARD ROUTING, ADD 16 BIT XFER

Mike Durkin:
Danpex EW-2016 is an inexpensive (US$85.) allegedly WD8013-compatible
ethernet card.

I have one of these cards also and after fiddling a bit with the source
found that the checksum in the probe fails.  I commented it out and am
using the card successfully, NFS mounting to and from my Sun3s with no
problems.

This patch reports the failure, but doesn't fail the probe because of it.

[ Editor's note: ]
Add "option WDCOMPAT" to enable this.  Do NOT do this if your card
already passes the checksum test,  or you don't have a WD80x3
board currently in your system, since disabling the checksum
will result in the kernel finding a board which isn't there.

Michael Galassi:
Allow routing between multiple Western Digital ethernet boards
which are installed in the same host.

Barry Lustig:
Enable 16 bit transfers for the WD8013 "Combo board".  This patch
is kernel configuration optional -- that is, it will not take full effect
(other than generic fixes) unless you modify your kernel configuration
file and rerun "config".

[ Editor's note: ]
Add "option WD8013" to enable this.  Do NOT do this if you will
have two or more wd boards, one of which is not a "Combo".

AUTHOR: Mike Durkin (mdurkin@tsoft.sf-bay.org)
AUTHOR: Michael Galassi (nerd@percival.rain.com)
AUTHOR: Barry Lustig (barry@ictv.com)
386BSD-Patchkit: patch00100

31 years agoADDS NEW BOOT CODE BY JULIAN ELISCHER
Julian Elischer [Thu, 10 Sep 1992 00:00:00 +0000 (00:00 +0000)]
ADDS NEW BOOT CODE BY JULIAN ELISCHER

[ Editors: ]
This is the new boot block package done by Julian Elischer.  See the
file /sys/i386/boot/README.386BSD for details.  Please note that this
may well become the default boot code, so your comments are appreciated.

AUTHOR: Julian Elischer (julian@ref.tfs.com)
AUTHOR: Rodney W. Grimes [repackaging] (rgrimes@agora.rain.com))
386BSD-Patchkit: patch00099

31 years agoADDS NEW SCSI CODE BY JULIAN ELISCHER
Julian Elischer [Mon, 15 Feb 1993 00:00:00 +0000 (00:00 +0000)]
ADDS NEW SCSI CODE BY JULIAN ELISCHER

[ Editors: ]
  This is the new scsi driver package done by Julian Elischer that supports
many new SCSI devices and controller boards.  See the file /sys/scsi/README
for details.  Please note that this driver is slated to *completely replace*
the current AS driver, so your comments are appreciated, especially those of
you with Adaptec compatable and/or older Adaptec controllers.

AUTHOR: Julian Elischer (julian@ref.tfs.com)
AUTHOR: Rodney W. Grimes [repackaging] (rgrimes@agora.rain.com))
386BSD-Patchkit: patch00098

31 years agoFIXED SUPPORT FOR MANY NEW DEVICES
Jordan K. Hubbard [Wed, 10 Mar 1993 00:00:00 +0000 (00:00 +0000)]
FIXED SUPPORT FOR MANY NEW DEVICES

[ Editors: ]
  This file adds necessary entries in /sys/i386/conf/{devices,files}.i386,
/sys/i386/i386/conf.c and /dev/MAKDEV for new drivers and the existing
lpt, bpf, and fd (not to be confused with Fd) drivers.  It fixes a typo
in /dev/MAKEDEV (kmem was spelled kmdem) and removes the reference to
flog in the comments.

AUTHOR:         Julian Elischer (julian@ref.tfs.com)
AUTHOR: Jordan K. Hubbard (jkh@violet.berkeley.edu)
AUTHOR:         Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00097

31 years agoPATCH TO CONFIG TO ALLOW COMMENTS IN *.i386
Julian Elischer [Mon, 15 Feb 1993 00:00:00 +0000 (00:00 +0000)]
PATCH TO CONFIG TO ALLOW COMMENTS IN *.i386

Allow files.i386, files and devices.i386 to have commnets
in the form of a leading #.
This in turn allows these files to be patched correctly by the patchkit.

AUTHOR:         Julian Elischer (julian@ref.tfs.com)
386BSD-Patchkit: patch00096

31 years agoINIT UNINITIALIZED VARIABLE IN ROUTE CODE
Charles Hannum [Sat, 27 Feb 1993 00:00:00 +0000 (00:00 +0000)]
INIT UNINITIALIZED VARIABLE IN ROUTE CODE

Obvious problem, someone forgot to initialize a variable who's value
might then be bogus if a later jump was taken.  Looks like this one
could have caused real problems if a gateway were not directly reachable.

AUTHOR: Charles Hannum
386BSD-Patchkit: patch00095

31 years agoPROPER RETURN VALUES FOR PTY CLOSE ROUTINES.
Charles Hannum [Sat, 27 Feb 1993 00:00:00 +0000 (00:00 +0000)]
PROPER RETURN VALUES FOR PTY CLOSE ROUTINES.

As posted to comp.os.386bsd.bugs, this patch stops ptsclose() and
ptcclose() from returning pseudo-random values, thus making close() of
a file descriptor not seem to return an error when there was none.

AUTHOR: Charles Hannum
386BSD-Patchkit: patch00094

31 years agoBETTER BYTE SWAPPING FOR GCC1 & GCC2
Charles Hannum [Sat, 27 Feb 1993 00:00:00 +0000 (00:00 +0000)]
BETTER BYTE SWAPPING FOR GCC1 & GCC2

The previous byte-swapping macros were rather inefficient, and didn't
take full advantage of the i486 architecture, when available.  It
also didn't work well with gcc2, which is where we're eventually heading.

AUTHOR: Charles Hannum
386BSD-Patchkit: patch00093

31 years agoFIX MAKE DEPEND READING FROM STDIN
Jordan K. Hubbard [Mon, 15 Mar 1993 00:00:00 +0000 (00:00 +0000)]
FIX MAKE DEPEND READING FROM STDIN

The SRCS line in the Makefile was wrong for expr, it caused
a make depend to execute the following line:
mkdep  -I. -I/usr/src/bin/expr
which should have been:
mkdep  -I. -I/usr/src/bin/expr expr.c

AUTHOR: The Editors
386BSD-Patchkit: patch00092

31 years agoFIX FLAG HANDLING IN CONFIG & TYPE OF ISA_DEVICE->IRQ
Chris G. Demetriou [Wed, 10 Mar 1993 00:00:00 +0000 (00:00 +0000)]
FIX FLAG HANDLING IN CONFIG & TYPE OF ISA_DEVICE->IRQ

Chris Demetriou:
This patch fixes handling of the 'flags' keyword in config.

Rodney W. Grimes:
The type of isa_device->irq was int, it is used as a bit field, so
IRQ15 becomes the signbit.  This caused many problems with trying
to use devices at IRQ15.

AUTHOR: Chris Demetriou
AUTHOR:         Rodney W. Grimes        (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00091

31 years agoFIX PERMISSION ERRORS IN NFS
Greg Hackney [Tue, 2 Mar 1993 00:00:00 +0000 (00:00 +0000)]
FIX PERMISSION ERRORS IN NFS

Fixes problem where one gets "permission denied" errors when accessing files
in NFS, even as root, and makes NFS permissions more POSIX compliant.

[ Editor's note:  There has been some controversy over this patch, due to
some initial lack of understanding as to what POSIX dictates here.  The
general consensus is that this is correct, but needs some improvement. ]

AUTHOR: The Unknown Author.
386BSD-Patchkit: patch00090

31 years agoADD STRTOD TO LIBC WHILE FIXING ATOF FP TRAP.
Jörg Wunsch [Mon, 1 Mar 1993 00:00:00 +0000 (00:00 +0000)]
ADD STRTOD TO LIBC WHILE FIXING ATOF FP TRAP.

This version of atof checks for overflow conditions, rather
than simply causing a SIGFP.  It also takes advantage of the overlap
between atof() and strtod() functionality to finally implement the
long-missing strtod in libc (yay!).  Also adjusts awk's config.h to
live with this new fact.

[ Editor's note: ]

ALSO BE SURE TO READ THE TOP LEVEL README FILE FOR THE PATCH KIT.
There are important instructions on how to properly build things
after installing this patch.  If you do not do so, this patch will
not do anything for you.

AUTHOR: Joerg Wunsch
386BSD-Patchkit: patch00089

31 years agoSCSI SUPPORT FOR ADAPTEC AHA-1542A BOARD AND TAPEDRIVE FIXES
James da Silva [Wed, 10 Mar 1993 00:00:00 +0000 (00:00 +0000)]
SCSI SUPPORT FOR ADAPTEC AHA-1542A BOARD AND TAPEDRIVE FIXES

Joerg Lohse:
The current aha1542 driver "as" supports only AHA-1542B controllers.
This patch extends the support to AHA-1542A controllers. The kernel's driver
"as.c" and the sources for "asboot" and "bootas" are patched. The makefile
in directory /sys/i386/stand is extended.

James da Silva:
The SCSI driver as.c assumed fixed-block-size tapedrives.
(Fix produced by Scott Burris)

as.c didn't write file marks.  The driver still doesn't write two filemarks
for end-of-medium, but that is less important.

as.c couldn't read multi-file tapes.  It didn't have any no-rewind devices.
The no-rewind devices have a minor number one greater than the
base number for the target (eg same as partition b for disks).

  Here's what I did with a tape at target 2:
# ln /dev/ras2a /dev/rst2
# mknod /dev/nrst2 c 13 17
  Now I refer to the tape as "/dev/rst2" and "/dev/nrst2".

The tape at SCSI target 4 doesn't work.  The solution is that the devices for
ras4[ad] in the distribution are wrong.  The major numbers should be 13,
 not 11.  Try:
# rm /dev/ras4[ad]
# mknod /dev/ras4a c 13 32
# mknod /dev/ras4d c 13 35
  (but you don't really need the d partition for tapes)
(this fix is from Bill Jolitz)

Rodney W. Grimes:
The target directory in the Makefile was wrong, it tried to install
this stuff in //stand.

AUTHOR: Joerg Lohse (lohse@tech7.informatik.uni-hamburg.de)
AUTHOR: James da Silva (jds@cs.umd.edu) et al
AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00088

31 years agoPATCH TO FIX NETSTAT BUILDS AND ADD RWHO, RWHOD AND RUPTIME
Karl Lehenbauer [Tue, 9 Mar 1993 00:00:00 +0000 (00:00 +0000)]
PATCH TO FIX NETSTAT BUILDS AND ADD RWHO, RWHOD AND RUPTIME

Karl Lehenbauer:
The rwho and ruptime commands and the rwho daemon (rwhod) were not
shipped with 386BSD 0.1.  These commands, if rwhod is enabled,
let you see uptime and who information for machines on your LAN.

It can cause a lot of overhead if there are a lot of machines on your
LAN.  A forthcoming multicast version will have much lower overhead.

This patch creates the necessary files to build these commands, along
with manpages of course.

All I did was grab them off of uunet, stick them in the right place, and
compile.  No changes were required.

Rodney W. Grimes:

To build,

1.  cd to /usr/src/usr.sbin/rwhod and do a "make obj", "make" and "make install"
2.  cd to /usr/src/usr.bin/rwho and do a "make obj", "make" and "make install"
3.  cd to /usr/src/usr.bin/ruptime and do a "make obj", "make" and "make install"
4.  set rwhod to YES in /etc/netstart.
5.  reboot

I added the fixes for the top level make files so that these get compiled on
complete builds.  Also added netstat to the top level makefile.

AUTHOR: Karl Lehenbauer (karl@NeoSoft.com)
AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00087

31 years agoMAX_DOUBLE AND HUGE_VAL ARE TOO HUGE. (SIGNAL 6 ABORTS)
Daniel Poirot [Sat, 27 Feb 1993 00:00:00 +0000 (00:00 +0000)]
MAX_DOUBLE AND HUGE_VAL ARE TOO HUGE. (SIGNAL 6 ABORTS)

Peter da Silva & Nick Handel:
The MAX_DOUBLE and HUGE_VAL values are too big, big enough in
HUGE_VAL's case that you automatically get an abort signal on any attempt
to compare it to another value, resulting in "trap 6" messages and the like.

I heard something about bugs in atof and the like, so these are probably
not the final word, but they get a lot more stuff to compile and run.

[ Editor's note: ]

This is definately not the final word.  This is an interm fix until
the real fix can be released.  ALSO BE SURE TO READ THE TOP LEVEL
README FILE FOR THE PATCH KIT.  There are important instructions
on how to properly build things after installing patches that if
you do not follow this patch will not do anything for you.

AUTHOR: Nick Handel (nhandel@NeoSoft.com)
AUTHOR: Peter da Silva (peter@NeoSoft.com)
AUTHOR: Daniel Poirot (poirot@aio.jsc.nasa.gov)
386BSD-Patchkit: patch00086

31 years agoGROFF COMPILATION FIX
Nick Handel [Sun, 28 Feb 1993 00:00:00 +0000 (00:00 +0000)]
GROFF COMPILATION FIX

Nick Handel:
A "make" from /usr/src will abort due to the absence of a "./grotty"
subdirectory in "/usr/src/usr.bin/groff". The source code for this "grotty"
program is apparently too valuable to distribute, as it was not included.
The binary distribution includes a compiled version, however.  The patch
removes the reference to "grotty" in "/usr/src/usr.bin/groff/Makefile",
and groff should now compile fine.

This patch nolonger removes the reference to "grotty" in
"/usr/src/usr.bin/groff/Makefile", it now supplies the directory and
the missing files.  The source to grotty was obtain from the bsd-sources
on gatekeeper.dec.com.  The version number of this grotty matches that
of the supplied binary.  Also most of files in the groff tree that this
grotty came from are identical to those in the 386bsd 0.1 distribution.

Although it is not the intent of the patchkit to support public software,
this was a piece of code that was provided with the initial distrubution,
thus the error of ommiting the source is being corrected.

AUTHOR: Nick Handel (nick@madhouse.neosoft.com)
AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00085

31 years agoTN3270 COMPILATION FIX
Nick Handel [Sun, 28 Feb 1993 00:00:00 +0000 (00:00 +0000)]
TN3270 COMPILATION FIX

A "make" from /usr/src will abort due to the absence of
"/usr/othersrc/share/mk/386bsd.lib.mk" as referenced in
"/usr/src/usr.bin/tn3270/api/makefile".  The correct reference is to
"/usr/othersrc/share/mk/bsd.lib.mk".
After applying the patch, it should compile without complaint.

Well it may compile without error, you well get lots of warnings,
and the resulting binary is known to crash some systems.  This well
be addressed in a later patch.

AUTHOR: Nick Handel (nick@madhouse.neosoft.com)
386BSD-Patchkit: patch00084

31 years agoMAJOR PCCONS FIXES FOR HANG AFTER COPYRIGHT + TIMEOUT FIXES
Bruce Evans [Sun, 14 Mar 1993 00:00:00 +0000 (00:00 +0000)]
MAJOR PCCONS FIXES FOR HANG AFTER COPYRIGHT + TIMEOUT FIXES

A20 INFO (Frank MacLachlan):
The pc_probe code isn't reseting the a20. That is only done in
the bootstrap. The probe code is just trying to reset the keyboard
controller. Alas, the original code uses general purpose routines for
issuing the commands. These general purpose routines read the keyboard
controller and return the value.  According to Bruce this code does not
even touch the A20, so I'm not so sure this is true anymore, rwgrimes.

PCPROBE INFO (Bruce Evans):
On some systems, the boot process hangs after the copyright notice
is displayed.  This was caused by not waiting for commands to complete and
has been fixed by polling the controller until it is finished, or
a timeout count is reached (in which case an error message is printed).
Also, the color/mono test was beeing optimized out due to not
declaring certain values as volatile.  The attributes for the mono mode
were corrected now that the color/mono test works correctly, they were
were displaying black on black under certain conditions.  Removed
the control-alt-delete reboot code, this is a very bad thing to
do to unix anyway!!

COMCONSOLE INFO (Chris Demetriou):
There where several bad typos and other stuff in the file.
It was originally part of my comconsole package.  Also the moving
of pg() is done here, this routine has been moved to a more general
place (i386/i386/cons.c).  Fixed the tab problem in ddb/db_output.c.

[ Editor's note: ]:
This is now an actually fix, not a workaround!

AUTHOR: Scotty ? & Frank MacLachlan (fpm@crash.cts.com) - A20 fix
AUTHOR: Bruce Evans - PCPROBE fixes
AUTHOR: Chris G. Demetriou (cgd@berkeley.edu) - COMCONSOLE
386BSD-Patchkit: patch00083

31 years agoCALIBRATED DELAY ROUTINE
Julian Elischer [Mon, 1 Feb 1993 00:00:00 +0000 (00:00 +0000)]
CALIBRATED DELAY ROUTINE

Many drivers need a good calibrated delay function this
impliments a spinwait(millisecs) which is compatible with that used by
MACH 2.6 and OSF1 1.0.4 because they share the same scsi code which
requires it.

AUTHOR: Julian Elischer (julian@ref.tfs.com)
386BSD-Patchkit: patch00082

31 years agoKERNEL STRCMP() MOVE
Julian Elischer [Sun, 7 Feb 1993 00:00:00 +0000 (00:00 +0000)]
KERNEL STRCMP() MOVE

Originally ddb had the only copy of strcmp in the kernel so
other parts couldn't link if ddb wasn't compiled in. (e.g. the scsi
system) move strcmp to kern_subr where it belongs.

AUTHOR: Julians Elischer (julian@ref.tfs.com)
386BSD-Patchkit: patch00081

31 years agoNEW DEVICE SETUP
Julian Elischer [Wed, 10 Feb 1993 00:00:00 +0000 (00:00 +0000)]
NEW DEVICE SETUP

In order to allow the addition of devices easier, I am adding a
number of empty cdevsw and bdevsw entries (allowing easy allocation of
major numbers to devices)

AUTHOR: Julian Elischer (julian@ref.tfs.com)
386BSD-Patchkit: patch00080

31 years agoCOM DRIVER SELECT FIX
Chris G. Demetriou [Wed, 10 Feb 1993 00:00:00 +0000 (00:00 +0000)]
COM DRIVER SELECT FIX

Patchkit 0.2 changed the way the device select interface worked,
which broke, among other things, the standard com driver.  This patch
will fix this and cure the symptom where the XFree86 server loops
continuously, eating CPU time.  The code for comselect was lifted
straight from Chris Demetriou's (cgd@agate.berkeley.edu) multiport
serial driver.

AUTHOR: Jordan K. Hubbard (jkh@whisker.lotus.ie) & Chris Demetriou
386BSD-Patchkit: patch00079

31 years agoADDED BELL MODE FOR X & X KERNEL DEFAULTS
Rich Murphey [Tue, 9 Feb 1993 00:00:00 +0000 (00:00 +0000)]
ADDED BELL MODE FOR X & X KERNEL DEFAULTS

The patch adds a bell ioctl for X mode, and adds the options
XSERVER and UCONSOLE in the config file so the X code will be compiled
in by default in the generic kernels.

AUTHOR: Rich Murphey (rich@lamprey.utmb.edu)
386BSD-Patchkit: patch00078

31 years agoPANIC REMRQ FIX
William Jolitz [Fri, 11 Dec 1992 00:00:00 +0000 (00:00 +0000)]
PANIC REMRQ FIX

This patch fixes some of the panic remrq reboots.

AUTHOR: Williams Jolitz (withheld)
386BSD-Patchkit: patch00077

31 years agoFIXED INIT FINALLY (??)
David Dawes [Tue, 26 Jan 1993 00:00:00 +0000 (00:00 +0000)]
FIXED INIT FINALLY (??)

This is a patchkit patch, because init.c never got fixed
correctly (even though the originally supplied patch was correct)

AUTHOR: XXX
386BSD-Patchkit: patch00076

31 years agoUNMATCHED SPL() CALL IN VM SYSTEM
Bruce Evans [Fri, 22 Jan 1993 00:00:00 +0000 (00:00 +0000)]
UNMATCHED SPL() CALL IN VM SYSTEM

I found an splbio() without a matching splx().  Even the
indentation suggests bugs!

AUTHOR: Bruce Evans (bde@runx.oz.au)
386BSD-Patchkit: patch00075

31 years agoPAGES LOST IN VM SYSTEM
Paul Mackerras [Fri, 22 Jan 1993 00:00:00 +0000 (00:00 +0000)]
PAGES LOST IN VM SYSTEM

The bug is that the call to vm_page_deactivate() at line 531 of
vm_fault.c does not put the (now no longer needed) page back on the
inactive list, because vm_page_deactivate() only does anything with
active pages.  Consequently, the page is then not on the active,
inactive or free lists and is effectively not available for use.  (It is
not lost forever, though, because it is still on its object's page
queue.)

AUTHOR: Paul Mackerras (paulus@cs.anu.edu.au)
386BSD-Patchkit: patch00074

31 years agoCOMPAQ & OTHER BOOT FIX
Frank Maclachlan [Fri, 22 Jan 1993 00:00:00 +0000 (00:00 +0000)]
COMPAQ & OTHER BOOT FIX

The relevant code from the stage 1 floppy boot,
'/sys/i386/stand/fdbootblk.c', is polling for an interrupt from the
floppy disk controller on interrupt level 6 (line 251).  The problem, I
think, is in line 179 wo enable interrupts *only* from the floppy
controller.
Also, Akihiro Higashi, in article
<1992Sep11.051554.29192@mlab.nttdocomo.co.jp>, reported that he had to
change 3rd & 4th "NOP"s to "JMP .+2"s on his COMPAQ 486/50L. 'NOP' is a
delay macro which alters the AL register.  The specific change is 3rd & 4th
"NOP"s to "JMP .+2"s on his COMPAQ 486/50L. 'NOP' is a delay macro which
alters the AL register.  The specific instances mentioned involve code
resetting the DMA controller's first/last flip-flop and then programming
the DMA controller's mode register. The initialization byte for the mode
register is clobbered by a NOP (I am amazed that the boot works on most
systems!).  This can be fixed by rearranging the code slightly.

AUTHOR: Frank MacLachlan (fpm@crash.cts.com)
386BSD-Patchkit: patch00073

31 years agoWD INITIALIZATION AND PARTITION BOUNDARY
Andrey A. Chernov [Sun, 17 Jan 1993 00:00:00 +0000 (00:00 +0000)]
WD INITIALIZATION AND PARTITION BOUNDARY

This code cleans up some bugs that were introduced by earlier
patches, and fixes up the code which assumed that partitions started
on cylinder boundaries.  Also, some other initialization bugs were
(hopefully) squashed.

AUTHOR: Bruce Evans and Andrew Chernov
386BSD-Patchkit: patch00072

31 years agoCLOCK CALCULATION FIX
Bruce Evans [Sun, 17 Jan 1993 00:00:00 +0000 (00:00 +0000)]
CLOCK CALCULATION FIX

The patch fixes years >= 2000.  The times were off by 14 sec
from about 1988 onwards using the 0.0 time database.  I think the 0.1
database has been hacked to avoid leap seconds.  There are a couple of
versions of the 0.1 database.  The default one has no leap seconds.  The
"right" one gives different differences (11 sec?).

AUTHOR: Bruce Evans (bde@runx.oz.au)
386BSD-Patchkit: patch00071

31 years agoMULTIPLE PROCESSES ON ONE PTY
Julian Elischer [Mon, 11 Jan 1993 00:00:00 +0000 (00:00 +0000)]
MULTIPLE PROCESSES ON ONE PTY

Two processes each write to the same pty in a special case, each
sleeps waiting on theoutput queue.  Unfortunatly, the pty code sleeps
and wakes up on this same address because the sub-field it seeks on is
the first in the output queue structure, and thus has the same address
as the queue as a whole. The solution is to make the pty code sleep and
wakeup on another sub-field of the structure.  The result of the
confusion is that the two processes writing to the pty simply keep
waking each other up (at high priority, and then going to sleep
themselves at high priority)  As a result, all other work on the
processor comes to a stop.

AUTHOR: Julian Elischer (julian@ref.tfs.com)
386BSD-Patchkit: patch00070

31 years agoARGC ON STACK FIX
Julian Elischer [Sat, 12 Dec 1992 00:00:00 +0000 (00:00 +0000)]
ARGC ON STACK FIX

In placing the argc into the user's addres space, we cannot just
use normal addressing, but rather, must use suword, (a form of copyout()
).

AUTHOR: Julian Elischer (julian@ref.tfs.com)
386BSD-Patchkit: patch00069

31 years agoADD RINT() MATH FUNCTION
Karl Lehenbauer [Thu, 17 Dec 1992 00:00:00 +0000 (00:00 +0000)]
ADD RINT() MATH FUNCTION

There is a manpage for the rint(3) function but it is not
present in libm.  The following patch allows the C version to be
compiled in.  After applying the patch, cd to /usr/src/lib/libm, do a
"make" and "make install", then maybe a "make clean".  libm will then
contain the rint function.

AUTHOR: Karl Lehenbauer (karl@one.neosoft.com)
386BSD-Patchkit: patch00068

31 years agoHANGING CONSOLE FIX
Holger Veit [Tue, 6 Oct 1992 00:00:00 +0000 (00:00 +0000)]
HANGING CONSOLE FIX

The problem is in /sys/kern/tty_pty. Ptsclose calls ttyclose
which invalidates a constty pointing to that tty slot correctly.
Ptcclose does not. Xterm -C grabs the console from elsewhere and assigns
it to its controlling pty. After end of xterm constty still points to
the now invalid struct tty. Ptcclose resets TS_CARR_ON, so that the
process that inherits this invalid console slot, goes to sleep, waiting
on ttopen, because there is "no carrier".

AUTHOR: Holger Veit (veit@du9ds3.uni-duisburg.de)
386BSD-Patchkit: patch00067

32 years agoADDED MORE SYMBOLS TO KERNEL
Warren Toomey [Thu, 28 Nov 1991 00:00:00 +0000 (00:00 +0000)]
ADDED MORE SYMBOLS TO KERNEL

This makes symorder -t keep some symbols in the kernel that are
used by applications such as ps(1) and netstat(1).

AUTHOR: Warren Toomey (wkt@csadfa.cs.adfa.oz.au)
386BSD-Patchkit: patch00066

31 years agoSMALL BUFFER LEAK IN PHYSIO()
Mark Tinguely [Sat, 28 Nov 1992 00:00:00 +0000 (00:00 +0000)]
SMALL BUFFER LEAK IN PHYSIO()

 There appears to be a small buffer leak in kern__physio.c. The
function physio() allocates a buf only for the lifetime of that
function. If the function exits on access error, the buf is not
released. This error was found while looking for M_TEMP allocation (ie.
may not be the direct cause of a known problem). This is a visible
fix. physio() is not called that often to cause a major memory loss.

AUTHOR: Mark Tinguely (tinguely@plains.nodak.edu)
386BSD-Patchkit: patch00065

31 years agoKERNEL SPEEDUP #2
Frank Maclachlan [Sat, 28 Nov 1992 00:00:00 +0000 (00:00 +0000)]
KERNEL SPEEDUP #2

It simply makes certain kernel routines a tiny bit faster. I
noticed that branch/function call addresses and some data items in
'/sys/i386/i386/locore.s' and '/sys/i386/isa/icu.s' are not aligned on
32 bit word boundaries (0 modulo 4).  This causes a small performance
hit on 386DX/486 based machines.  I aligned things on 4 byte boundaries
using a macro, ALIGN32, to perform the alignment since the new version
of the Gnu assembler will probably change the meaning of .align 2.  I
also eliminated an unnecessary instruction in ___divsi3.  I don't claim
a profound performance boost, but every little bit helps!

AUTHOR: Frank MacLachlan (fpm@crash.cts.com)
386BSD-Patchkit: patch00064

32 years agoKERNEL SPEEDUP #1
Poul-Henning Kamp [Thu, 28 Nov 1991 00:00:00 +0000 (00:00 +0000)]
KERNEL SPEEDUP #1

This patch cuts a quite large chunk of the processing in the
kernel. For some unfortunate reasons pmap.c is a focal point from a
performance point of view, this patch improves things a bit, but it is
still the most used routine in the kernel.  The 16.6% is actually the
percentage 'system-time' is cut when doing a make kernel on my machine.

AUTHOR: Poul-Henning Kamp
386BSD-Patchkit: patch00063

32 years agoCOMPAT_43 KERNEL DEPENDENCY CLEANUP
Warren Toomey [Thu, 28 Nov 1991 00:00:00 +0000 (00:00 +0000)]
COMPAT_43 KERNEL DEPENDENCY CLEANUP

 Here is a patch for the use of COMPAT_43 in the 386BSD kernel.
This is an extremely LOW priority patch, because lots of applications
(init, csh, vi) depend on this being defined, so you can't use a kernel
with this option removed. The only application that does cope with this
option missing is my own shell which is POSIX-compliant. But you might
want to add it in now rather than have to rediscover it at a later
stage.

AUTHOR: Warren Toomey
386BSD-Patchkit: patch00062

31 years agoOBSCURE TELNET BUG
William Jolitz [Fri, 11 Dec 1992 00:00:00 +0000 (00:00 +0000)]
OBSCURE TELNET BUG

This patch fixes fixes an obscure telnet that messed up another i
structure because it was using a "freed" process.

AUTHOR: Williams Jolitz (withheld)
386BSD-Patchkit: patch00061

31 years agoREMOVE MATH EMULATION CODE FOR 387 & 486 USERS
Poul-Henning Kamp [Sat, 28 Nov 1992 00:00:00 +0000 (00:00 +0000)]
REMOVE MATH EMULATION CODE FOR 387 & 486 USERS

        This patch allows you to cut the size of your kernel by quite a
chunk, but only if you have a numeric hardware device, ie. i387 or i486.
On systems with the right hardware add either of these lines to your
config file:
options "i486" OR options "i387"
run config and rebuild the kernel.

AUTHOR: Poul-Henning Kamp
386BSD-Patchkit: patch00060

31 years agoV7 IOCTL COMPATABILITY FIXES
Scott Reynolds [Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)]
V7 IOCTL COMPATABILITY FIXES

This patch adds TIOCSTAT to ioctl() and the missing gtty/stty
macros to complete the V7 ioctl() compatibility.

AUTHOR: Scott Reynolds (scott@clmqt.marquette.mi.us)
386BSD-Patchkit: patch00059

8 years ago*** BINARY PATCH --- WARNING: USE ALL BINARIES AT OWN RISK ***
Havard Eidnes [Sun, 6 Mar 2016 10:09:51 +0000 (12:09 +0200)]
*** BINARY PATCH --- WARNING: USE ALL BINARIES AT OWN RISK ***

Binary and manual page for netstat command.

AUTHOR: Havard Eidnes (Havard.Eidnes@runit.sintef.no)
386BSD-Patchkit: patch00058

31 years agoADD THE "netstat" SOURCES TO 386BSD
Havard Eidnes [Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)]
ADD THE "netstat" SOURCES TO 386BSD

I've ported netstat from NET2 to 386bsd version 0.1. The changes
are mostly involved with inserting #ifdefs for ISO, NS and IMP at the
relevant places ("removing" that code, essentially), not compiling some of
the modules (although the source remains toghether with comments in the
Makefile) plus modifying the "unixpr()" routine in unix.c to traverse the
open file table the new way.  The "netstat -r" output looks a bit odd
(although I guess this is the "new way"?), but gives the right information.

NOTE:
This is *NOT* a cannonical patch... these files are generated as
initially modified from the NET2 sources to have Havard's fixes in them.  A
cannonical patch would include the original sources.  For this reason, A
patch level 0 has not been established for these files.

After installation, you must type the following before building:

ln -s /usr/obj/usr.bin/netstat /usr/src/usr.bin/netstat/obj

A binary patch containing the installed executable and manual page is included
after this patch, should you wish to avoid rebuilding it.  Use binaries at
your own risk.

AUTHOR: Havard Eidnes (Havard.Eidnes@runit.sintef.no)
386BSD-Patchkit: patch00057

31 years agoGNU TROFF LEAK - G++ BUG
James Clark [Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)]
GNU TROFF LEAK - G++ BUG

I would guess that the problem is that your copy of groff was
compiled with g++ 1.39.  This version of g++ has a bug that causes a
serious leak in GNU troff.

AUTHOR: James Clark (jjc@jclark.com)
386BSD-Patchkit: patch00056

31 years agoLED's in X MODE
Terry Lee [Sat, 28 Nov 1992 00:00:00 +0000 (00:00 +0000)]
LED's in X MODE

In X mode (pc_xmode), the LEDs are now updated.

AUTHOR: Terry Lee (terry@uivlsi.csl.uiuc.edu)
386BSD-Patchkit: patch00055

31 years agoFIX "mountd" BUG IF SUBDIR OF LOCAL MOUNT POINT EXPORTED
Rick "gopher I [Tue, 8 Sep 1992 00:00:00 +0000 (00:00 +0000)]
FIX "mountd" BUG IF SUBDIR OF LOCAL MOUNT POINT EXPORTED

/sbin/mountd went into an infinite loop when subdirs of local mount
points were exported.

AUTHOR: Rick "gopher I" (root@snowhite.cis.uoguelph.ca)
386BSD-Patchkit: patch00054

31 years agoNFS KERNEL PATCH SET
Rick "gopher I [Tue, 8 Sep 1992 00:00:00 +0000 (00:00 +0000)]
NFS KERNEL PATCH SET

Unofficial fixes for several nfs related problems:
1 - RFC1094 does not clarify what the semantics of a create rpc should be
    on the server when the file already exists. It appears that some recent
    versions of SunOS expect the file to be truncated to length 0 only if
    the size field of the setattr has been specified. (This semantic has
    not been clarified by anyone within Sun ONC engineering, although I
    have tried mailing them.)

2 - IBM AIX3.2 NFS clients expect a server to reply RPCPROG_MISMATCH to
    an rpc request sent to the nfs port (2049), but not nfs, in order to
    identify an AIX server. (The 386bsd.01 server simply dropped these
    requests on the floor, confusing AIX clients.)

3 - Some servers require that the nfs client use a reserved port number,
    which the 386bsd.01 client did not. (The is a crock, since requiring
    a reserved port number does not enhance nfs security significantly.)

AUTHOR: Rick "gopher I" (root@snowhite.cis.uoguelph.ca)
386BSD-Patchkit: patch00053

31 years agoCHANGE "vaddr" CALCULATION, MOVE BADLY PLACED "#endif"
David Greenman [Tue, 8 Sep 1992 00:00:00 +0000 (00:00 +0000)]
CHANGE "vaddr" CALCULATION, MOVE BADLY PLACED "#endif"

Resident memory size (RSS) and %MEM have been corrected; the
kernel namelist caching will now work (in conjunction with patch 00001).

AUTHOR: David Greenman, Paul Kranenburg
386BSD-Patchkit: patch00052

31 years agoFIX THE NEWVM "mempages" CALCULATION
David Greenman [Fri, 14 Aug 1992 00:00:00 +0000 (00:00 +0000)]
FIX THE NEWVM "mempages" CALCULATION

The "ps" program incorrectly calculate the number of memory pages;
it got a number NBPG (512?) times larger than it actually wanted.  This
could, of course, upset ps somewhat.

AUTHOR: David Greenman (davidg%implode@percy.rain.com)
386BSD-Patchkit: patch00051

31 years agoFIX "SHELL GOES AWAY ON 'pwd'" BUG
Paul Kranenburg [Sat, 22 Aug 1992 00:00:00 +0000 (00:00 +0000)]
FIX "SHELL GOES AWAY ON 'pwd'" BUG

The problem is that the "getpwd()" was incorrectly longjmp'ed
out of if "/bin/pwd" could not be run.

AUTHOR:         Paul Kranenburg (pk@cs.few.eur.nl)
386BSD-Patchkit: patch00050

31 years agoFIX SECONDARY BOOT CHECKING WRONG STATUS
Robert D. Thrush [Sun, 6 Sep 1992 00:00:00 +0000 (00:00 +0000)]
FIX SECONDARY BOOT CHECKING WRONG STATUS

We've found a showstopper in the secondary boot (bootwd) for some
DTK controllers that we tried to use.  It appears to me that this may
solve the problem that many have reported about not being able to boot
from the hard disk after "install".  At least, it has solved it for
us.

The problem occurs in /sys/i386/stand/wd.c. In wdinit() the controller
is reset; however, the wrong register is tested for busy.  On some
controllers, this mis-test seems to cause no harm.  However, it seems to
hang forever on a few here.

To replace the bootwd on your already "installed" hard disk, do
something like the following:

1. Recompile "bootwd" in /usr/src/sys.386bsd/i386/stand.
2. Copy it over /usr/mdec/bootwd on the fixit.fs diskette.
3. Boot from this fixit.fs diskette.
4. Make the floppy writeable, ie. mount -u /dev/fd0a /
5. Obtain the existing hard disk label, ie.
"disklabel -r wd0 >wd0.label"
6. Replace the primary and secondary boots via
"disklabel -R -r wd0 wd0.label /usr/mdec/wdboot /usr/mdec/bootwd"

NOTE: A binary of this bootwd is available by ftp from agate.berkeley.edu.

AUTHOR: Robert D. Thrush (rd@phoenix.aii.com)
386BSD-Patchkit: patch00049

31 years agoFIX CPIO SYMLINK/HARDLINK BUG
Guy Harris [Sun, 16 Aug 1992 00:00:00 +0000 (00:00 +0000)]
FIX CPIO SYMLINK/HARDLINK BUG

The "cpio" program has a bug which tells it to make hard links
to symlinks that results in hard links being made to the target of the
symlink, even if it's a directory, if you have permission to do so.

AUTHOR: Guy Harris (guy@auspex.com)
386BSD-Patchkit: patch00048

31 years agoFFLUSH STDIO LIBRARY FIX
Dave Rivers [Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)]
FFLUSH STDIO LIBRARY FIX

I've discovered the following discrepency in the stdio library
w/ regards to opening a stream using  fopen("file","a+")  and later
calling fflush() on that stream. The fopen() call resets the flags to
__SRW because of the '+' in the mode string.  Later on, fflush() checks
to ensure that the stream being flushed is actually writable.  To do
this, it looks for the __SWR value in the flags, and *not* __SRW.  There
is a comment in stdio.h that implies that __SWR and __SRW will never be
set at the same time.

AUTHOR: Dave Rivers (rivers@ponds.uucp)
386BSD-Patchkit: patch00047

31 years agoFLOATING POINT FIXES (FSCALE, 0x1FD)
Ishii Masahiro [Sat, 19 Sep 1992 00:00:00 +0000 (00:00 +0000)]
FLOATING POINT FIXES (FSCALE, 0x1FD)

This is actually two patches in one.  It fixes the Floating Point
Emulation in two places.  The first is for the 0x1fd instruction; the
second is in Fscale.  It is believed to fix the atof() function, among
others, which normally fails on non-FPU machines.

AUTHOR: Ishii Masahiro, R. Kym Horsell
386BSD-Patchkit: patch00046

31 years agoFIXES SILO OVERFLOWS IF A 16550 IS INSTALLED
Rodney W. Grimes [Wed, 23 Sep 1992 00:00:00 +0000 (00:00 +0000)]
FIXES SILO OVERFLOWS IF A 16550 IS INSTALLED

Here is a patch to fix silo overflows if you have 16550 uarts.  The
problem is due to the FIFO trigger level being set to 14 bytes.  This
only leaves 2 bytes after the interupt before it overflows.  This is
not enought time at high speeds.  By changing the trigger level to
4 bytes I have had a 38400 baud line running full speed with out any
silo overflows.

AUTHOR: Rodney W. Grimes (rgrimes@agora.rain.com)
386BSD-Patchkit: patch00045

31 years agoADD DAYLIGHT SAVINGS TIME HANDLING TO THE KERNEL
Arne Henrik Juul [Fri, 14 Aug 1992 00:00:00 +0000 (00:00 +0000)]
ADD DAYLIGHT SAVINGS TIME HANDLING TO THE KERNEL

There is actually code in the kernel to allow for DST in the
realtime (bios) clock, but  (a) it has a little bug, and (b) it is
#ifdef'd out. We now have the right timezone in the kernel (-1 dst)
and in the BIOS too, and it actually works.

AUTHOR: Arne Henrik Juul <arnej@lise.unit.no>
386BSD-Patchkit: patch00044

31 years agoELVIS :wq! fix
Felix Gaehtgens [Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)]
ELVIS :wq! fix

Usually in vi you may go out with <ESC>:wq! which is what i'm
used to. ok, i could probably do the same with <ESC>:x! but <ESC>:wq!
doesn't work because a flag in ex.c isn't set which tells the command
handler that the bang is an allowed option for the "wq" command.

AUTHOR: Felix Gaehtgens (felix@escape.vsse.in-berlin.de)
386BSD-Patchkit: patch00043

32 years agoOCCASIONAL NFS READ REQUEST HANG
Martin Renters [Fri, 24 Apr 1992 00:00:00 +0000 (00:00 +0000)]
OCCASIONAL NFS READ REQUEST HANG

        The problem is that nfs_readrpc() is sometimes called with the
argument bp->b_rcred.  This is only ever initialized to NOCRED (-1).
The code in nfsm_reqh() doesn't check for NOCRED and simply uses whatever
happens to be in memory at that location.

AUTHOR:         Martin Renters (martin@innovus.com)
386BSD-Patchkit: patch00042

31 years agoYANK FROM NAMED BUFFER
Bob Wilcox [Wed, 12 Aug 1992 00:00:00 +0000 (00:00 +0000)]
YANK FROM NAMED BUFFER

The inability to use a named buffer was the result of three lines
near the end of the tmpabort() function (in tmp.c) that unconditionally
closed and unlinked the temp file.  These three lines were not present in
the distribution of elvis 1.5 that I had gotten back in April (from
prep.ai.mit.edu, I believe).  Deleting these lines seemed to have fixed
this problem.

AUTHOR: Bob Wilcox (bob@obiwan.uucp) -- bad: news.dell.com!udell!obiwan
386BSD-Patchkit: patch00041

31 years agoCD-ROM FILES SEEM TO DISAPPAER
Scott Burris [Mon, 10 Aug 1992 00:00:00 +0000 (00:00 +0000)]
CD-ROM FILES SEEM TO DISAPPAER

The infamous "off by 1" problem hit two places in the isofs code.
There is a check to see that a directory entry doesn't span more than one
physical block -- if so, that's an error.  Well if the directory entry just
happened to end at the last byte of the block, the kernel throught it
crossed into the next block and bailed out assuming the CD-ROM wasn't following
the standard.  The effect is that not only can't you access the file associated
with this directory entry, you also can't see any files or directories located
after that entry.

This is relatively rare, because a series of directory entries must fit
perfectly into a 2048 byte CD-ROM block for this to trigger.

AUTHOR: Scott Burris (scott@pita.cns.ucla.edu)
386BSD-Patchkit: patch00040

31 years agoMAKE SOMETIMES REMOVES DIRECTORIES
David Dawes [Mon, 10 Aug 1992 00:00:00 +0000 (00:00 +0000)]
MAKE SOMETIMES REMOVES DIRECTORIES

I was building X386 this morning, and when I interrupted 'make' it
told me it had removed a directory.  I checked and it really had unlinked
it.  (I got it back by booting the fixit disk and running fsck.)

I've patched the make source so that it won't do this anymore.

AUTHOR: David Dawes (dawes@physics.su.OZ.AU)
386BSD-Patchkit: patch00039

31 years agoERRORS NOT SEEN WHEN READING RAW WD DEVICE
Frank Maclachlan [Thu, 17 Sep 1992 00:00:00 +0000 (00:00 +0000)]
ERRORS NOT SEEN WHEN READING RAW WD DEVICE

I/O errors are not reported when reading/writing from/to the raw
wd disk device.  I noticed this when using 'dd' to scan a disk w/ known
bad blocks and couldn't find any.

The wd driver, '/sys/i386/isa/wd.c', sets the B_ERROR bit in
bp->b_flags, but fails to put an error code into bp->b_error.  Physio()
in '/sys/kern/kern__physio.c', which manages the raw I/O in this case,
ignores the B_ERROR bit in b_flags and looks for an error code in b_error.
The user program is fed garbage data and no clue that an error occurred.

AUTHOR: Frank Maclachlan (fpm@crash.cts.com)
386BSD-Patchkit: patch00038

31 years agoSOURCES NOT CORRECTLY IDENTIFIED IN "crond" MAKEFILE
Adrian Hall [Tue, 15 Sep 1992 00:00:00 +0000 (00:00 +0000)]
SOURCES NOT CORRECTLY IDENTIFIED IN "crond" MAKEFILE

The makefile for the crond had the objects listed in the sources
line.  This caused "make depend" to fail.

AUTHOR: Adrian Hall (adrian@ibmpcug.co.uk)
386BSD-Patchkit: patch00037

31 years agoPS FLOATING POINT EXCEPTION
Goran Hammarback [Mon, 14 Sep 1992 00:00:00 +0000 (00:00 +0000)]
PS FLOATING POINT EXCEPTION

There is a bug in the implicit type conversion from int to double in GCC,
probably dealing with the optimization of function return values.  The
gist of this is that an extern double function that isn't declared has
an implicit type of int.  Assigning a double variable the return value
of this function causes a floating point exception.  Declaring the
function fixes 'ps'.

AUTHOR: Goran Hammarback[?] (goran@astro.uu.se)
386BSD-Patchkit: patch00036

31 years agoTELNETD 'KLUDGELINEMODE' FIX
Felix Gaehtgens [Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)]
TELNETD 'KLUDGELINEMODE' FIX

If telnetd is compiled with the KLUDGELINEMODE option defined
something's going wrong when you're using tcsh, zsh, bash etc. and can't
use the SUSP and INTR characters.  Also whenever you do something which
outputs a couple of lines the newlines look messed up. i'm not really
sure what's the problem here (maybe something in raw-mode)? but at least
compiling it without the KLUDGELINEMODE works just beautifully.

AUTHOR: Felix Gaehtgens (felix@escape.vsse.in-berlin.de)
386BSD-Patchkit: patch00035

31 years agoDISKLABEL PROGRAM REQUIRED ACTIVE PARTITION
Gary A. Browning [Fri, 18 Sep 1992 00:00:00 +0000 (00:00 +0000)]
DISKLABEL PROGRAM REQUIRED ACTIVE PARTITION

It turns out that if you have not set an active partition on the SECOND
drive, the disklabel program thinks that the DOS partition table is invalid
and promptly, and without warning, assumes it owns the whole disk.  It then
writes it's label over the DOS partition table.  I am not sure what it even
means to have an active partition on the second drive since DOS will not
boot from there anyway.

A valid DOS parition no longer must have exactly one active partition.  This
is certainly not a required patch.  The workaround is to always remember to
have an active partition on each disk.

AUTHOR: Gary A. Browning (gab10@griffcd.amdahl.com)
386BSD-Patchkit: patch00034

31 years agoREAD FROM "/dev/drum" CAUSES CRASH
Paul Kranenburg [Wed, 9 Sep 1992 00:00:00 +0000 (00:00 +0000)]
READ FROM "/dev/drum" CAUSES CRASH

Due to an improperly initialized buffer in 'physstrat', an attempt
to read from /dev/drum would generally cause a crash.

AUTHOR: Paul Kranenburg (pk@cs.few.eur.nl)
386BSD-Patchkit: patch00033

31 years agoKERNEL NAMELIST DATABASE CREATION/USE
David Greenman [Wed, 5 Aug 1992 00:00:00 +0000 (00:00 +0000)]
KERNEL NAMELIST DATABASE CREATION/USE

   There are several bugs in the kernel namelist db creation/use and
bugs in kvm.c which causes ps and several other utils to fail to work
correctly.

The kvm.c patches are based in part on, but supersede, the patches posted
on usenet by Paul Kranenburg [which introduced bugs of its own].
In order for kvm_mkdb to work correctly, vers.o MUST be the first object
linked in the kernel. The Makefile.i386 should read:
SYSTEM_LD= @${LD} -z -T FE000000 -o $@ -X vers.o ${SYSTEM_OBJS}
(or vers.o should be first in SYSTEM_OBJS)

And, of course all things that depend on libutil.a will have to be rebuilt.

AUTHOR: Paul Kranenburg, David Greenman
386BSD-Patchkit: patch00032

31 years agoVGA MAPPING AND SCANCODE GENERATION
Pace Willisson [Fri, 18 Sep 1992 00:00:00 +0000 (00:00 +0000)]
VGA MAPPING AND SCANCODE GENERATION

This patch creates ioctl commands for putting the console in/
taking the console out of "X mode".  When set into "X mode", the console
will generate scan codes at the keyboard and map the VGA memory into the
setting processes address space.

WARNING:
This patch takes several liberties.  The first is not defining a
seperately settable "scan code mode".  The second is changing the behaviour
of the keyboard in "normal" mode.  This may result in an inability to use
alt-"-", alt-"=", or F11 or F12 on some machines, in particular, the Toshiba
T1100 and Epson Equity 1 and Equity 1+ laptops.

AUTHOR: Pace Willisson (pace@blitz.com)
386BSD-Patchkit: patch00031

31 years agoALLOW MAPPING OF VGA MEMORY
Pace Willisson [Thu, 6 Aug 1992 00:00:00 +0000 (00:00 +0000)]
ALLOW MAPPING OF VGA MEMORY

Allow mapping of the VGA memory into the process address space.
Major reason for this is to allow the X server to operate.

AUTHOR: Pace Willisson (pace@blitz.com)
386BSD-Patchkit: patch00030

31 years agoSIGTERM + 10 SECONDS BEFORE SIGKILL TO ALLOW NORMAL EXIT
David Dawes [Sat, 15 Aug 1992 00:00:00 +0000 (00:00 +0000)]
SIGTERM + 10 SECONDS BEFORE SIGKILL TO ALLOW NORMAL EXIT

When changing to single user run state, send a SIGTERM to processes
and give them 10 seconds to exit before sending a SIGKILL.  This was added
to allow normal shutdown of processes.  In particular, it allows the X
server to reset the screen and keyboards to normal states.

AUTHOR: David Dawes (dawes@physics.su.OZ.AU)
386BSD-Patchkit: patch00029

31 years agoALLOW CONSOLE REDIRECTION TO WORK
Pace Willisson [Sun, 16 Aug 1992 00:00:00 +0000 (00:00 +0000)]
ALLOW CONSOLE REDIRECTION TO WORK

This allows writes to /dev/console to be redirected to a virtual
console for things like "xterm -C" and so on.

AUTHOR: Pace Willisson (pace@blitz.com)
386BSD-Patchkit: patch00028

31 years agoPERFORM CORRECT RANGE CHECHING ON "toupper()/tolower()"
Wiljo Heinen [Sun, 2 Aug 1992 00:00:00 +0000 (00:00 +0000)]
PERFORM CORRECT RANGE CHECHING ON "toupper()/tolower()"

The toupper() and tolower() functions did not do appropriate
range checking, and would shift the value of any ASCII character passed
+/- 32, respectively, without regard to whether the characters so shifted
were letters or not.  This corrects the problem, although, like the rest
of the C library, does not take internationalized character sets into account.

AUTHOR: Wiljo Heinen (wiljo@freeside.ki.open.de)
386BSD-Patchkit: patch00027

31 years agoACCESS() FIX
Bruce Evans [Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)]
ACCESS() FIX

access() is supposed to return 0 if all of the desired access
modes would be granted.  In 386BSD-0.1, it returns 0 if one of the modes
would be granted.

AUTHOR: Bruce Evans (bde@runx.oz.au)
386BSD-Patchkit: patch00026

31 years agoADD ABILITY TO EXECUTE FILES WITH "#!" MAGIC NUMBER
Paul Kranenburg [Wed, 5 Aug 1992 00:00:00 +0000 (00:00 +0000)]
ADD ABILITY TO EXECUTE FILES WITH "#!" MAGIC NUMBER

If the first two characters of a file are "#!", this constitutes
a "magic number" which indicates that the file is a shell script and that
the character string following the "#!" should be executed, and that the
shell script itself should be used as stdin for the program executed.

AUTHOR: Paul Kranenburg (pk@cs.few.eur.nl)
386BSD-Patchkit: patch00025

31 years agoENFORCE EXECUTE PERMISSIONS, MNT_NOEXEC
Mark Tinguely [Sat, 15 Aug 1992 00:00:00 +0000 (00:00 +0000)]
ENFORCE EXECUTE PERMISSIONS, MNT_NOEXEC

>problem 3: I noticed that anyone could run shutdown. the permissions were
>
>-rwsr-x--- owner root group operator. I changed the permissions to
>-r-x------ and anyone can still run it. (you get the shutdown: NOT super-user)

This is a big security hole. In 0.0, a VOP_ACCESS was used, but root always
succeeds (and tries to execute anything).  But the check for a single execute
bit is wrong too.  I put the VOP_ACCESS back but also checked to make sure
at least one execute bit is on before root can execute the file.  I also
checked if the filesystem was mounted for execution:

AUTHOR: Mark Tinguely (tinguely@plains.nodak.edu)
386BSD-Patchkit: patch00024

31 years agoCLEAN UP UTMP ENTRIES, LOG TO WTMP
Nate Williams [Fri, 24 Jul 1992 00:00:00 +0000 (00:00 +0000)]
CLEAN UP UTMP ENTRIES, LOG TO WTMP

This allows init to remove entries from the utmp file when users log
out, and also adds logout information for the wtmp file.

AUTHOR: Nate Williams (osynw@terra.oscs.montana.edu)
386BSD-Patchkit: patch00023

31 years agoCHANGE RUN LEVEL (SINGLE USER/MULTIUSER/HALT)
Christoph Robitschko [Fri, 31 Jul 1992 00:00:00 +0000 (00:00 +0000)]
CHANGE RUN LEVEL (SINGLE USER/MULTIUSER/HALT)

/sbin/init did not set some internal flags correctly (Reboot, drain)
This caused it to not execute /etc/rc again if the system was brought down
to singleuser and the back up again.  It also tried to start multiuser mode
when you tried halt or reboot in singleuser (when the singleuser shell was
terminated by halt/reboot).

AUTHOR: Christoph Robitschko (chmr@edvz.tu-graz.ac.at)
386BSD-Patchkit: patch00022

31 years agoSECOND WD STYLE DISK, BZERO MALLOCED FOR WARM BOOT
Christoph Robitschko [Fri, 31 Jul 1992 00:00:00 +0000 (00:00 +0000)]
SECOND WD STYLE DISK, BZERO MALLOCED FOR WARM BOOT

System would not recognize second hard drive and would crash when
you try to acces a second drive which is configured but not connected.
I include a patch which should correct these problems.  It will try to
open all configured disks at boot time and print the identification strings.

This patch also includes the laptop/warmboot patch the bzero's
malloc'ed memory, since this memory may contain the same data between
boots and cause the driver to believe the disk has already been connected.

AUTHOR: Christoph Robitschko (chmr@edvz.tu-graz.ac.at)
386BSD-Patchkit: patch00021