Bruce Evans [Wed, 29 Jul 1998 14:19:48 +0000 (14:19 +0000)]
Honor NOSHARED for tools. All tools should be built static for
`make world' to avoid problems with picking up (new) target or (stale)
host shared libraries.
Don't honor -static in LDFLAGS for linking LKMs. LDFLAGS is not
actually for ld, but we use it anyway, and must prevent -static being
misinterpreted as -s.
Bruce Evans [Wed, 29 Jul 1998 13:00:42 +0000 (13:00 +0000)]
Fixed error handling:
- Call isa_dmadone() whenever necessary to stop DMA and/or free bounce
buffers. Undead DMA corrupted the malloc freelist fairly consistently
in the following configuration: SLICE kernel, 2 floppy drives, no disk
in fd0, disk in fd1.
- Don't call fdc_reset() from fd_timeout(). Doing so gave an "extra"
interrupt which was usually misinterpreted as being for completion
of the next FDC command; the interrupt for completion of the next
FDC command was then usually misinterpreted... There were further
complications for interrupts latched by the soft-spl mechanism so
that they were delivered after all the h/w interrupts went away.
This caused at least wrong head settle delays and may be why the
FreeBSD floppy driver seems to munch floppies more than most floppy
drivers. The reset was unnecessary anyway in cases that didn't have
the bug described next, since is was repeated a little later for
the IOTIMEDOUT state. The state machine has complications to handle
resets correctly, so just use it.
- Don't call retrier() from fd_timeout(). The IOTIMEDOUT state needs
to be processed next, and it isn't valid to set to that state if
retrier() has aborted the current transfer. Doing so caused null
pointer panics after the previous bug was fixed.
Improved error handling:
- If an i/o is aborted, arrange to reset in the state machine before
doing the next i/o. New fdc flag for this. This fixes spurious
warnings and lengthy busy-waiting for the next i/o.
- Split STARTRECAL into RESETCOMPLETE and STARTRECAL and only check
for the results from reset if we actually reset. This fixes spurious
warnings for other paths to STARTRECAL. [Oops, it may break reset
handling for motor-off resets.]
Cleanups in fd_timeout():
- Renamed to fd_iotimeout() to make it clearer that it is only used
for i/o.
- Don't handle the bp == 0 case. This case can't happen for i/o.
- Don't check for controller-busy. We know it must be.
- Don't print anything. retrier() already prints too much for normal
errors.
- Fudge the state differently so that the state machine advances
fdc->retry and the status is invalid (perhaps this should fudge a
valid state like the one for WP).
- Style fixes.
Bruce Evans [Wed, 29 Jul 1998 08:24:23 +0000 (08:24 +0000)]
Use the slice-relative blkno in all parts of the label write
protection checks. Using the partition-relative blkno in some
parts broke the write protection for partitions at unusual
offsets (only for partitions at offset 1 on i386's).
several new features are added:
- support vc/vp shaping
- support pvc shadow interface
code cleanup:
- remove WMAYBE related code. ENI WMAYBE DMA doen't work.
- remove updating if_lastchange for every packet.
- BPF related code is moved to midway.c as it should be.
(bpfwrite should work if atm_pseudohdr and LLC/SNAP are
prepended.)
- BPF link type is changed to DLT_ATM_RFC1483.
BPF now understands only LLC/SNAP!! (because bpf can't
handle variable link header length.)
It is recommended to use LLC/SNAP instead of NULL
encapsulation for various reasons. (BPF, IPv6,
interoperability, etc.)
the code has been used for months in ALTQ and KAME IPv6.
Tim Vanderhoek [Wed, 29 Jul 1998 00:46:13 +0000 (00:46 +0000)]
Allow env. variable LS_COLWIDTHS to specify minimum column widths,
effectively overriding the dynamically-sized-column feature. This
is mostly useful for non-interactive use, where it may be necessary
to ensure that listings taken at different times have columns that
line-up correctly. I have been assured that at least one large,
well-known program will soon be taking advantage of this. :-)
PR: bin/7011
Submitted by: Joel Ray Holveck <joelh@gnu.org>
Brian Somers [Tue, 28 Jul 1998 21:54:54 +0000 (21:54 +0000)]
Silence ``Network unreachable'' warnings when using
``add .... HISADDR''. The network will never be
reachable at this point unless we're in -auto or reading
the command from ppp.linkup.
We can now run the following lines and get the expected
results:
set ifaddr 1.2.3.4/0 5.6.7.8/0
add default HISADDR
where a route is added immediately in auto mode and the
whole thing is delayed 'till the IP numbers have been
agreed in other modes.
Brian Somers [Tue, 28 Jul 1998 21:54:30 +0000 (21:54 +0000)]
o Tidy up PAP and CHAP diagnostics. They're now all logged as PHASE
diagnostics (which are on by default).
o Deal correctly with both sides wanting CHAP.
o Output a warning if we're using an empty ``authname''. This is
*not* what we want to do.
Bruce Evans [Tue, 28 Jul 1998 19:39:09 +0000 (19:39 +0000)]
Set bp->b_resid for failed transfers in dscheck(). This is the
best place to set it, and the wd and wfd strategy routines don't
set it (for failed transfers) because they expect dscheck() to
initialize everything necessary. dscheck() has always set B_ERROR,
but this is not quite sufficient, because b_resid is used by physio()
to decide how much of a B_ERROR'ed i/o was done.
Warner Losh [Tue, 28 Jul 1998 18:50:01 +0000 (18:50 +0000)]
Commit patch from Tor Egge to fix the "large filesystem restore" problem.
This appears to work for me in the old case, but I don't have large
enough filesystems to test the fix case.
Bruce Evans [Tue, 28 Jul 1998 18:25:51 +0000 (18:25 +0000)]
Used daddr_t's, not ints, to store disk block numbers. Updated printf
formats and args to match. Fixed old printf format errors (all related;
most were hidden by calling printf indirectly).
This change somehow avoids compiler bugs for 64-bit longs on i386's,
although it increases the number of 64-bit calculations.
Bruce Evans [Tue, 28 Jul 1998 17:55:37 +0000 (17:55 +0000)]
Set p->p_switchtime to switchtime instead of to the current time in
fork_trampoline() if switchtime is valid. This fixes not accounting
for the time between the previous context switch and and the current
time (when the forked child starts up here) in most cases - the time
is now counted in the child's runtime. I think it actually fixes
all cases, and switchtime is always valid here, since there must have
been a context switch just before the forked child starts up. Some
code should be removed if this is correct. The check that switchtime
is valid sometimes gives a false negative because the check isn't
correct until the after the first context switch after the system
has been up for >= 1 second.
Bruce Evans [Tue, 28 Jul 1998 15:30:01 +0000 (15:30 +0000)]
Fixed two spl nesting bugs. They caused (at least) the entire pageout
daemon to run at splvm() forever after swap_pager_putpages() is called
from vm_pageout_scan().
Don't exit() from cleanup() if we got there via a non-signal since
we're only going to exit (after printing a more detailed error message)
afterwards anyway.
PR: 7020
I have a PD drive (Matsushita PD/CD Drive LF-1600).
The machine can not recognize this PD drive
as neither PD drive nor CD-ROM Drive.
So I can not use CD-ROMs and PDs from FreeBSD.
Spelling, add rcsid, remove unused #includes.
Convert 1000000 usec to 1 sec 0 usec.
Use provided safe malloc (rtmalloc()) instead of malloc(): exit on allocation
failure.
Correct use of .Nm
Add usage() and use errx().
Comment is .\" not .|'. Add -d and -t flags to SYNOPSIS and usage(). Getopt
returns -1. Correct use of .Nm. Spelling. Add rcsid and remove unused
#include.
Jonathan Lemon [Tue, 28 Jul 1998 03:29:32 +0000 (03:29 +0000)]
Fix an off-by-one error when setting the iomap bits.
Change struct i386_*_iomap to use ints instead of shorts/chars.
(pointed out by bde long ago, prodded into action by msmith)
Jacques Vidrine [Mon, 27 Jul 1998 21:15:52 +0000 (21:15 +0000)]
csh built-in printf now expands arguments. e.g.
printf '%d\n' `echo 23`
now works as expected.
PR: bin/2969
Submitted by: Gareth McCaughan <gjm11@dpmms.cam.ac.uk>
Bruce Evans [Mon, 27 Jul 1998 19:16:21 +0000 (19:16 +0000)]
Fixed double counting of runtime after a process exits. The last
timeslice of the exiting process was counted for both the exiting
process and the next process to run if the next process runs
immediately.
Broken in: mostly in kern_clock.c rev.1.70 (1998/05/28)
Jacques Vidrine [Mon, 27 Jul 1998 18:40:09 +0000 (18:40 +0000)]
fixed: tar will extract file even if -C command fails
tar now exits with new exit code EX_BADDIR after a failed chdir()
in name_next(), name_match(), and name_from_list().
PR: bin/2394
Submitted by: Satoshi Asami <asami@freebsd.org>
Harlan.Stenn@pfcs.com added two (very interesting) options to syslogd for
-current (Thanks Harald). However, on my attempt to try this on -STABLE,
I found that when forwarding to another host the actual messages gets lost.
This is due to a wrong index because when the -v option was added, the
indexes shifted one place.
PR: 7407
Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Warner Losh [Sun, 26 Jul 1998 17:06:05 +0000 (17:06 +0000)]
Use malloc + sprintf rather than asprintf to ensure portability to
other, less advanced architecutres. This should minorly help porting
efforts of FreeBSD. I've done several make worlds since this came up
with this change, as well as debugging several interesting nits with
-V (which is the only thing this change will affect really).
Bruce Evans [Sat, 25 Jul 1998 16:35:06 +0000 (16:35 +0000)]
Don't pass the label to diskerr(), since the label is being constructed
and may be invalid. In particular, d_secpercyl may be 0, and diskerr()
divides by it.
Bruce Evans [Sat, 25 Jul 1998 16:19:10 +0000 (16:19 +0000)]
Fixed bugs in `disklabel -R...':
- nonstandard sector sizes didn't work because the sector size in the
ASCII label was not read before a (default, wrong) sector size was used.
- the exit status was 0 after exiting early due to an invalid ASCII label.
Abort `disklabel -B...' if the secondary bootstrap doesn't fit.
Alexander Langer [Sat, 25 Jul 1998 15:52:44 +0000 (15:52 +0000)]
Override the default VFS LKM dispatch functions so that a module
unload function can be provided (this is necessary to unregister
the at_exit handler).
By default, /usr/bin/time writes its output to stderr. Two options
have been added to time(1) to write output to an alternative destination.
Option "-f filename" will write to filename, and filename can be - to
write to stdout. Option "-a filename" will append the output to filename.
Time(1) man page has been updated to reflect the change.
PR: 7368
Submitted by: Steven G. Kargl <kargl@troutmask.apl.washington.edu>
During compilation of a Fortran program f2c/f77 will spew the
name of entry points, functions, subroutines, and program to
stderr error. The enclosed patches do 3 things:
(1) Silenced the output to stderr.
(2) Added a -v option to f2c and f77. This will turn on a verbose
mode, and dumps quite a bit of stuff to stderr.
(3) Updated the f2c man page.
PR: 7369
Submitted by: Steven G. Kargl <kargl@troutmask.apl.washington.edu>
On the alpha, ports may be allocated above 64k.
Change the port address argument to pci_map_port to pci_port_t* which is
defined as u_int on the alpha, u_short on i386. This is a stopgap with a
hopefully limited lifetime.