nate [Tue, 23 Dec 1997 16:32:35 +0000 (16:32 +0000)]
This patch causes the "calltodo" timer list to be decremented by the amount
of time that the laptop was suspending. Thus, select() calls that might have
suspended rather than firing at 1hr + "time suspended" since the timer was
posted.
Adding:
options APM_FIXUP_CALLTODO
to the kernel config enables the patch.
[
This patch was slightly modified to use a consistant indent style and
I removed some unused local variables. After this has been tested a
few weeks we'll make the options the default, so for now I'm now
documenting it in LINT. Mike can later if he wants.
]
Reviewed by: Mike Smith <msmith@freebsd.org>
Submitted by: Ken Key <key@cs.utk.edu>
yokota [Tue, 23 Dec 1997 08:04:38 +0000 (08:04 +0000)]
- Added support for a new MouseMan model (4 buttons, no wheel).
Based on the report from Dave Bodenstab.
- Turn off PnP COM device enumeration procedure if the user explicitly
specifies a protocol type with the "-t" option.
- Accept "-t auto". Now the user may entirely omit the "-t" option
in the command line, or specify "-t auto" in order to make moused
detect an appropriate protocol type automatically. In the
previous version, moused did so only if the "-t" option is absent
in the command line. ("-t auto" won't disable PnP COM device
enumeration.)
- Updated the man page.
jb [Mon, 22 Dec 1997 19:39:20 +0000 (19:39 +0000)]
Reviewed by: William LeFebvre <wnl@groupsys.com>
Change errno -> error in local structure to avoid a clash with the
thread-aware version of errno which is required for a thread-safe libc.
Have discussed this with the author and he has agreed to this change. 8-)
joerg [Sun, 21 Dec 1997 21:40:02 +0000 (21:40 +0000)]
Properly clean out the SI_MOUNTEDON flag iff the mount attempt fails
half the way down. Otherwise, further attempts to mount the device
will be rejected with BUSY.
IMHO, this flag can completely go away for cd9660. There's no reason
you need to prevent CDs from being mounted multiple times, and in case
of multisession CDs it can even make sense to mount two different
sessions by the same time (to different mount points, otherwise it
would be pointless ;).
bde [Sun, 21 Dec 1997 00:00:44 +0000 (00:00 +0000)]
Fixed overflow in chkrange(). Some out of bounds block numbers,
e.g. -1, were not detected. Use a bulletproof check that doesn't
depend on special properties of the args or the limit.
joerg [Sat, 20 Dec 1997 23:05:14 +0000 (23:05 +0000)]
Duplicate the entry for the Plasmon CD-R device, so both possibilities
(read/only and write/once) will be covered. This is necessary in order
to fill in the proper device information record.
joerg [Sat, 20 Dec 1997 23:03:49 +0000 (23:03 +0000)]
Protect against a null pointer dereferencation in the case of an
unknown drive. Such a drive will be configured by worm(4)
nevertheless (albeit with a warning), but cannot be opened except of
the SCSI control device (so scsi(8) or cdrecord will continue to
work).
bde [Sat, 20 Dec 1997 22:24:32 +0000 (22:24 +0000)]
Fixed style bugs in the printing of statistics after preening. Use
floating point better in the percentage calculation there to avoid
overflow when there are more than about 20 million fragments. Start
using floating point in the other percentage calculation to avoid
overflow when there are more than about 2 million fragments.
bde [Sat, 20 Dec 1997 21:36:58 +0000 (21:36 +0000)]
Don't attempt to print the statistics for a "clean" preened filesystem
when there isn't even a filesystem. Attempting to print them tended
to cause SIGSEGV or SIGFPE depending on how far setup() got before it
returned 0. This was broken in the previous revision by removing a
return statement that the previous case depended on falling into.
PR: 4840 (fixed by this commit)
PR: 2537 (possibly fixed by Lite2 merge and later changes. setup()
does more checking now)
wosch [Sat, 20 Dec 1997 18:46:09 +0000 (18:46 +0000)]
Added builtin decompression using zlib library, option -Z.
Enabled this new feature with the makefile variable GREP_LIBZ. If
you don't like it, compile with `make GREP_LIBZ='.
grep + zlib has several advantages:
- the shell script zgrep(1) will be basically a one line
exec grep -Z "$@"
- no shell script, no bugs. The current zgrep implementations
have many bugs and some grep options are no supported.
- no shell script, no security risks.
- it is a magnitude faster than a shell script
Also fixed:
0 -> STDIN_FILENO
Close a file descriptor only if the open call was successfully. It does
not hurt for the open(2) function, but the gzclose(3) function
died in free() to free up (not) allocated memory.
se [Sat, 20 Dec 1997 09:04:25 +0000 (09:04 +0000)]
Make the class code checks in function pci_cfgcheck less strict.
It failed to recognize the PCI bus in a system that had only an
old chip-set (class code 000000) and a Cyclom multiport serial
card on PCI bus 0, but no VGA card or disk or network controller.
PR: i386/5300
Submitted by: Nickolay N. Dudorov <nnd@itfs.nsk.su>
jb [Sat, 20 Dec 1997 04:06:06 +0000 (04:06 +0000)]
Change errno usage as a field in a structure and as an argument to a
function from 'errno' to 'error' so that there is no conflict with the
thread-safe definition of errno in errno.h.
sef [Sat, 20 Dec 1997 03:05:47 +0000 (03:05 +0000)]
Clear the p_stops field on change of user/group id, unless the correct
flag is set in the p_pfsflags field. This, essentially, prevents an SUID
proram from hanging after being traced. (E.g., "truss /usr/bin/rlogin" would
fail, but leave rlogin in a stopevent state.) Yet another case where procctl
is (hopefully ;)) no longer needed in the general case.
bde [Sat, 20 Dec 1997 00:40:05 +0000 (00:40 +0000)]
Never create the destination directory at install time.
Don't build things at install time.
Don't override the (correct) clean rule.
Rewrote all the rules and cleaned up.
bde [Fri, 19 Dec 1997 23:33:08 +0000 (23:33 +0000)]
Removed a stale comment. (We don't declare ip_len and ip_offset as
short. I guess we depend on bogus ANSI value-preserving extension
of u_short to int to avoid unsigned comparison bugs.)
bde [Fri, 19 Dec 1997 22:11:29 +0000 (22:11 +0000)]
Fixed the termcap 3.0 hacks. They were very broken in my configuration
where shared libraries are in /lib and almost everything is linked
shared. First, they removed the old shared library before installing
the new one. Second, they attemped a cross-device link from /lib
to /usr/lib/compat.
bde [Fri, 19 Dec 1997 21:37:18 +0000 (21:37 +0000)]
Exec dmesg and awk to print everything in the message buffer
following "panic:" or "Fatal trap". `panicstr' is still printed,
although it is redundant if there is a valid message buffer and
incomplete if it contains `%'s. I think the awk command belongs
here and not in a script since a standard format with complete
messages is good for bug reports.
bde [Fri, 19 Dec 1997 21:08:54 +0000 (21:08 +0000)]
Override gdb's version of N_TXTADDR() with the (new) system version
so that gdb gets the text address right for kernels. Override some
other macros to get a consistent set.
bde [Fri, 19 Dec 1997 20:44:48 +0000 (20:44 +0000)]
Made N_TXTADDR() work for kernels (assume that a ZMAGIC file with an
out of bounds a_entry is a kernel and use the usual kludge to find
the text address). If gdb had used this, it would have been able
to find the kernel text address properly. Unfortunately, it uses
its own a.out macros, so this is mainly an example for gdb to copy.
bde [Fri, 19 Dec 1997 20:20:22 +0000 (20:20 +0000)]
Don't strip trailing slashes (for the initial rmdir). It breaks
following of the symlink for `rmdir symlink/' and is unnecessary
for ordinary directories (POSIX doesn't require rmdir(1) to do
anything for trailing slashes; it requires rmdir(2) to let them
"refer to a directory", and following the symlink for symlink/ is
what BSD does). This also fixes bugs in the slash-stripping code
(for paths consisting entirely of slashes, the pointer into the
string was decremented to "before" the beginning of the string,
and the path was at best stripped to "".
The behaviour is unchanged except for the final directory for
`rmdir -p ...'. There is no alternative to stripping intermediate
slashes since they must be specified. The sloppy slash-stripping
code is adequate for intermediate directories, since the all-slashes
case fails early.
bde [Fri, 19 Dec 1997 18:48:45 +0000 (18:48 +0000)]
Only remove ${CLEANFILES} in the default clean rule. In particular,
don't remove a.out explicitly. a.out should only be generated for
libraries and is removed in the non-default rule in bsd.lib.mk.
Removed undocumented cleanfiles target. It was the same as the
default clean target except it didn't descend into subdirs. It was
different from special clean targets in other ways. This feature
hasn't been missed for more important targets.
Removed unused default cleandepend target. bsd.dep.mk has a better
version which is always used.
Use a better rule for checkdpadd in the BINFORMAT=aout case. This
mainly checks that ld -f is working correctly. The old rule is
still available via `make BINFORMAT=foo checkdpadd' and should be
used to check for regressions under 2.2 where ld -f is not available.
brian [Fri, 19 Dec 1997 18:11:05 +0000 (18:11 +0000)]
Reset our "ifaddr" to zero if the "set ifaddr" fails in
-auto mode. This makes ppp correctly exit if you kick it
off twice in auto mode with the same label (read: interface).
julian [Fri, 19 Dec 1997 03:36:15 +0000 (03:36 +0000)]
Fix an incredibly horrible bug in the ipfw code
where if you are using the "reset tcp" firewall command,
the kernel would write ethernet headers onto random kernel stack locations.
Fought to the death by: terry, julian, archie.
fix valid for 2.2 series as well.