Commit Graph

4636 Commits

Author SHA1 Message Date
bde
09b2ad8f57 Partially fixed negative and truncated "Avail" counts in df output.
This fixes PR943.

ffs/ffs_vfsops.c:
ffs_statfs() multiplied by (100 - minfree) as part of calculating the
minfree percentage (complemented in 100%), so with the standard minfree
of 8, it was broken for file systems of size >= 1TB/92 = 11GB.  Use the
standard freespace() macro instead.  This also fixes a rounding bug (the
"Avail" count was sometimes 1 too small).

ffs/* (not fixed):
The freespace() macro multiplies by minfree, so with the standard
minfree of 8, it is broken for file systems of size >= 1TB/8 = 128GB.
This bug is more serious since it affects block allocation.

ffs/ffs_alloc.c (not fixed):
Ordinary users are sometimes allowed to allocate 1 (partial) block
too many so that the "Avail" count goes negative.  E.g., if there is
1 fragment available and the file is fairly large, one more full
block is allocated.

df/df.c:
ufs_df() used/uses essentially the same code as ffs_statfs(), so it
had/has the same bugs.

ufs_df() gratuitously replaced "Avail" counts of < 0 by 0, so it
gave different results for non-mounted file systems in this case.
1996-01-14 18:55:09 +00:00
joerg
1fb34dbd86 Bump the timeout in st_load() from 5 to 15 minutes. My Tandberg
TDC3620 takes 4.5 minutes to retenstion a QIC-250 cartridge, so the
5 minutes seem to be too tight.
1996-01-14 16:29:01 +00:00
sos
8c205b9407 Add linux_mknod so that it will do mkfifo if needed... 1996-01-14 10:59:58 +00:00
gibbs
dc5826ccfb Register our softc at attach time. I forgot to do this in my last commit,
causing a panic.
1996-01-14 02:19:42 +00:00
phk
541487770e Document NFS_NOSERVER. 1996-01-13 23:30:10 +00:00
phk
bd3c94b695 Add an option NFS_NOSERVER which saves 100K in the install kernel (or
any other kernel that uses it).  Use with option NFS.
1996-01-13 23:27:58 +00:00
bde
ff115eca17 Fixed renaming of private DEBUG macro. The previous revision missed
one case in asc.c and almost all cases in gsc.c.
1996-01-13 20:43:10 +00:00
phk
b66b3c7839 Avoid bzero becomming a common symbol in all .o files. 1996-01-13 18:02:41 +00:00
bde
0569fe704e Fixed handling of Feb 29 in resettodr(). 1996-01-12 17:33:12 +00:00
gibbs
ad2f315960 Take a different approach to the SPIORDY race condition. Simply clear
SPIORDY just before we ack on the bus so that there is no chance to
see SPIORDY for the same byte twice.

Make some small modifications so that the Linux aic7xxx driver can use
our sequencer and register definition files verbatum.
1996-01-11 06:17:49 +00:00
se
3f28cf3423 Add back initialization of "ncrp[unit]" since ncrcontrol relies on it. 1996-01-10 21:20:57 +00:00
ats
1389f3d793 Add the 3C595 as a supported device for vx0. Delete the rest of the line
for the vx0 device, it is not needed as for all other pci devices.
1996-01-09 23:14:57 +00:00
ats
a958d6f807 Add the pci-numbers for the 3c595 10/100Mb card to the driver. 1996-01-09 23:07:32 +00:00
se
4f2c0d9bd5 Add back nncr and ncrp for now. ncrcontrol relies on them.
(To be replaced by sysctl accesses some time ...)

Remove a backward jump from the NCR script, which allowed a SCSI target
to receive any number of NOP messages it desired. If a target indeed
does such a silly thing, make it fail at the next instruction, instead
of causing a timeout a few seconds later.
1996-01-09 19:57:49 +00:00
gibbs
790808fbf0 Don't bother setting the DSCommand register. Adaptec's own BIOS doesn't. 1996-01-09 16:14:53 +00:00
gibbs
fb1c846170 Change the inb and outb routines slightly. It seems that waiting for
SPIORDY after polling REQINIT is a bad idea.
1996-01-09 16:14:03 +00:00
dg
d8b722a198 Fix logic bug (!= should be ==) in recent P2P/multicast kludge.
Reviewed by:	Bill Fenner <fenner@parc.xerox.com>
Submitted by:	Dave Marquardt <marquard@austin.ibm.com>
1996-01-09 08:26:07 +00:00
wpaul
ecb2b93c6a Fix the 'extraneous newline' problem a little more sensibly: just taking
it out fixes my problem but hoses the GUS MAX probe messages. Check what
device we have and print things appropriately for each.

Pointed out by: Jim Lowe <james@miller.cs.uwm.edu>
1996-01-09 03:19:51 +00:00
peter
7fb4de5305 clean up si_dprintf a bit so that it uses vararg argument parsing that does
not cause warnings, and uses printf() to do a vprintf()-like output.
1996-01-09 03:01:45 +00:00
guido
5e4470eefc Fix a bug where having a process listening to both a INADDR_ANY and a
local address, that was assigned with ifconfig alias and netmask
0xffffffff, would receive duplictae udp packets.
This behaviour can easily be seen by having named run, and using the alias
address as the name server.
This solution is not the pretiest one, but after talk with Garreth, it
is seen as the most easy one.
1996-01-08 20:59:06 +00:00
ache
5359e61084 Replace ugly year/month calculations in resettodr to more clean
variants, idea taken from NetBSD clock.c.
At least year calculation was wrong, pointed by Bruce.
Use different strategy to store year for BIOS without RTC_CENTURY
1996-01-08 18:50:14 +00:00
joerg
5b179f6860 MTRETENS for the wt driver. This patch got lost with
my previous commit.
1996-01-08 12:46:15 +00:00
joerg
183861cb86 Implement the MTRETENS command. 1996-01-08 12:26:15 +00:00
peter
f2df8588b1 No longer generate empty opt_sysvipc.h, and no longer issue -DSYSVSHM etc
for the CFLAGS.  Now, it tracks whatever the booted kernel has rather than
being specifying what features your kernel has at lkm build time.
1996-01-08 05:36:17 +00:00
peter
5857a458e6 No longer generate empty opt_sysvipc.h.. 1996-01-08 05:33:26 +00:00
peter
054c7581e9 Reran makesyscalls.sh.. 1996-01-08 05:27:29 +00:00
peter
1ce9f8a9d3 Oops. forgot to remove #include "opt_sysvipc.h" 1996-01-08 05:24:09 +00:00
peter
f39981eafe sysv_ipc.c now "standard" as it contains #if defined(...) blocks
of code that handle the various permutations of SYSV options.  sysv_shm.c
etc (the implementations) are still optional, this is just a file of
stubs and an optional utility function.
1996-01-08 04:39:20 +00:00
peter
78ea23da57 reran makesyscalls
Always call the SYSV ipc functions, stubs will take their place if
necessary.
1996-01-08 04:34:54 +00:00
peter
c4f00c1bee reran makesyscalls.. 1996-01-08 04:32:20 +00:00
peter
a444db506a (gulp!) reran makesyscalls..
sysv_ipc.c: add stub functions that either simply return (for the hooks
in kern_fork/kern_exit) or log() a messgae and call enosys() (for the
syscalls).  sysv_ipc.c will become "standard" in conf/files and has
#ifs for all the permutations.
1996-01-08 04:30:48 +00:00
peter
efbf950665 Remove the #ifdef SYSVSHM etc. Always call the functions, some stubs
are about to go in.  This is to fix the problem with the ibcs2 and linux
lkm's not being able to call the sysv ipc functions unless the build is
modified.
1996-01-08 04:13:25 +00:00
peter
fbae840fac Also move /var/db/kvm_kernel.db to /var/db/kvm_kernel.old.db IF we change
sysctl kern.bootfile - since libkvm expects it there.
1996-01-08 03:55:36 +00:00
phk
5be10e418b It's bad if the blockno is negative. 1996-01-07 22:39:06 +00:00
phk
b387640a54 Only change the sysctl variable if it presently points to /kernel. 1996-01-07 22:31:27 +00:00
gibbs
17c4ed7010 Add an adapter_softc field to the scsi_link struct. 1996-01-07 19:27:06 +00:00
gibbs
351b5488ff Write the cahesize and latency timer values back into configuration
space (whoops!).

Add a missing argument to the cachesize/lattime printf.

Set the CACHETHEN bit in DSCommand.
1996-01-07 19:26:12 +00:00
gibbs
bd7680de32 Use the new adapter_softc field in the scsi_link structure so that
these drivers don't need to maintain an array of configured units.

The bt driver still needs to because ISA interrupt handlers take a
unit number. :(
1996-01-07 19:24:36 +00:00
gibbs
4de2efd43f Use the new adapter_softc field in the scsi_link structure so that
in the future, these drivers won't need to maintain an array of
configured units. They still need to because ISA interrupt handlers
take a unit number. :(

Pass "softc" pointers instead of unit numbers to many functions that
did a conversion of unit->softc anyway.
1996-01-07 19:22:39 +00:00
gibbs
63d1a3af37 Use the new adapter_softc field in the scsi_link structure so that
this driver no longer needs to maintain an array of configured units.

Pass "softc" pointers instead of unit numbers to many functions that
did a conversion for unit->softc anyway.
1996-01-07 19:20:59 +00:00
gibbs
d012bf5a60 Add comment about only needing on of either ahc, ncr, or ahb type
controllers to handle any number of devices.
Remove unnecessary extra units for these controllers.
1996-01-07 19:19:38 +00:00
gibbs
5a0a47aacc aic7xxx.seq:
Add the same type of safeguards we use in the mesg_in phase to the mesg_out
phase.

aic7xxx_reg.h:
Add definitions for the DSCommand register for PCI adapters.
1996-01-07 19:18:28 +00:00
phk
5fea82ccdc The second cast wasn't needed.
Submitted by:	bde
1996-01-07 09:42:36 +00:00
wpaul
76158e361c Add NMSS to the list of things that local.h checks for when decding
whether of not to automatically #define EXCLUDE_AUDIO; MSS is a real
audio device and we should not #define EXCLUDE_AUDIO if we have one.
(And I want it because it's the only mixer-capable audio driver that I
can use with my crummy Packard Bell (nee Aztech) audio board.)

This fixes the very confusing condition where having all of this:

mss0 at 0x530 irq 10 drq 1 on isa
gus0: <MS Sound System (CS4231)>
opl0 at 0x388 on isa
opl0: <Yamaha OPL-3 FM>
mpu0 at 0x300 irq 9 drq 0 on isa
mpu0: <MPU-401 MIDI Interface 0.0 >

will still give you this:

% cat /dev/sndstat
SoundCard Error: The soundcard system has not been configured

Also remove an unnecessary newline in the printf() message for the
'gus0' device shown above so that we don't wind up printing a blank
line between mss0 and gus0.
1996-01-07 08:12:13 +00:00
dg
0b9ef74a6c Print out the queue index if it's found to be inconsistent. 1996-01-06 23:58:03 +00:00
joerg
12eff60d62 Document the ``BOOT_HD'' make option for the bootblocks. 1996-01-06 23:37:10 +00:00
dg
d59c50fa05 Rework vm_hold_{load,free}_pages to calculate an index once and use that.
At the same time, be sure to page-truncate bp->b_data so that the result
of the calculation isn't negative.
1996-01-06 23:23:02 +00:00
peter
73c4b7c9ad Detach fpu and gnufpu from Makefile.. These lkm's build (or used to)
but are not quite useable.  (fpu is used by init, and process switch
apparently..)
1996-01-06 23:15:40 +00:00
peter
5c9d4b68ee Choose a different name to hold the option definition.. The original one
was overlapping with another file, and making some undesirable behavior a
little worse - it's triggering a bug in config that appears to have been
there for some time (before the options files, anyway.)
1996-01-06 23:10:57 +00:00
ache
84d32db8c6 Add opt_sysvipc.h rules similar as in ibcs2 Makefile
(make fails in old case)
1996-01-06 23:10:25 +00:00