Detect failure open condition for direct mode now
Don't assume that modem descriptor must be >=3 in CloseModem,
just assume it is any valid descriptor >=0
Mark Murray [Mon, 10 Mar 1997 06:38:26 +0000 (06:38 +0000)]
Initial import of the Brooktree PCI-TV drivers. I have not tested
these, they may not even compile. I am importing them on behalf
of the submitters.
Submitted by: amancio, smp
Don't waste time scanning tun_in+10 descriptors, scan exactly what
we need now.
Don't assume that file descriptor can't be 0 (many places)
Protect FD_* macros from being used with negative descriptors
Shorten MS EXT show help to fit 80 cols
Update MAKEDEV to handle lots of tun devices, consistent with the tun device
selection code in usr.sbin/ppp/os.c (tun0-tun127, rather than tuna and tunb).
Also, make it make all devices up to and including the requested one.
I remove pending signals completely, they are not useless, they are
dangerous! Signal handlers themself must be fixed to not call malloc,
but no pended handlers, it will be correct fix. In finite case each signal
handler can set some variable which will be analized later, but calling
handler functions manually is too dangerous (f.e. signals not blocked while
the handler or handlers switch executed in this case). Of course this
code can be fixed instead of removing, but it not worth fixing in any case.
Should go into 2.2
In addition sig.c code shows following dangerous fragments (there can be more,
but I stop after two):
This fragment
if (fn == SIG_DFL || fn == SIG_IGN) {
handler[sig-1] = (sig_type)0;
<------------- here
signal(sig,fn);
} else {
cause NULL pointer reference when signal comes
"here", but more worse fragment is below:
void handle_signals() {
int sig;
if (caused)
for (sig=0; sig<__MAXSIG; sig++, caused>>=1)
if (caused&1)
(*handler[sig])(sig+1);
}
caused is bitmask which set corresponding bit on each signal coming.
And now imagine, what happens when some signal comes (bit sets) while loop
is executed (see caused>>=1 !!!)
In this light carrier drop situation was (as gdb shows)
1. SIGSEGV in handle_signals because some junk called as *handler reference.
2. Since SIGSEGV was pended too (== never happens),
it can cause various range of disasters.
Bruce Evans [Sun, 9 Mar 1997 10:39:15 +0000 (10:39 +0000)]
Cloned src/lib/libc/i386/DEFS.h to create <machine/asm.h> for the i386.
The former file was too hard to get at from other parts of the src tree
and will go away.
Bruce Evans [Sun, 9 Mar 1997 07:12:37 +0000 (07:12 +0000)]
Don't use a dot in the chown command. In fact, don't use a chown command.
Use mtree instead of mkdir+chown+chmod to build the subdirectory hierachy.
The corresponding mtree command in src/etc/Makefile can't be relied on
because the hierachy gets blown away in the default SHARED=symlinks case.
Bruce Evans [Sun, 9 Mar 1997 06:08:22 +0000 (06:08 +0000)]
Don't use a dot in a chown command. In fact, don't use any commands
except `install' at install time. Don't build things at install time.
Don't hide the build steps using @. Install with mode ${NOBINMODE}
instead of 444.
Poor source layout made this harder than it should have been. E.g.,
a suffix rule can't be used because of the subdirectories, and a
new makefile per subdirectory (i.e.m per data file) would be excessive.
See /usr/src/usr.bin/mklocale for a better organisation.
bsd.doc.mk:
rename GZIPCMD to DCOMPRESS_CMD, add DCOMPRESS_EXT
bsd.info.mk:
rename GZIPCMD to ICOMPRESS_CMD, add ICOMPRESS_EXT
set INFOTMPL to ${INFODIR}/dir-tmpl
bsd.man.mk
rename ZEXTENSION to MCOMPRESS_EXT, MCOMPRESS to MCOMPRESS_CMD
Bruce Evans [Sat, 8 Mar 1997 21:41:41 +0000 (21:41 +0000)]
Don't use a dot in the chown commands. In fact, don't use any commands
except `install' at install time. Don't build things at install time.
Install with mode ${NOBINMODE} instead of 444.
Nate Williams [Sat, 8 Mar 1997 20:04:20 +0000 (20:04 +0000)]
Added comments regarding 3Com PCMCIA cards:
- Multi-function ethernet/modem cards are not supported
- 3c589D is not supported
- Add advice on how to setup the driver to work with 3c589 cards.
- State how to select the network connector.
Bruce Evans [Sat, 8 Mar 1997 19:28:07 +0000 (19:28 +0000)]
Don't use a dot in the chown commands. In fact, don't use any commands
except `install'. Changed $() to ${}. Don't use the afterinstall target
(it is only for things that must be done after the install target is
built).
Cleaned up some messages, added a check to remove a leftover popd file
from /var/mail, added a routine to delete the removed user's files
from /tmp, /var/tmp, & /var/tmp/vi.recover, and added code to kill any
running processes owned by the removed user). I've also added a flag
for non-interactive execution, cleaned up the man page, and adjusted
my address.
Bruce Evans [Sat, 8 Mar 1997 16:09:38 +0000 (16:09 +0000)]
Use the common nchstats struct instead of a private one for ncs_2passes
and ncs_pass2. The public one is already used for other cd9660 statistics
and the private one was effectively invisible.
Bruce Evans [Sat, 8 Mar 1997 15:22:14 +0000 (15:22 +0000)]
Fixed the hash formula. Lite2 doesn't have phashinit(), so Lite2's hash
formula uses `& nchash'. This is very broken when nchash is a prime
number instead of 1 less than a power of 2, but the Lite2 formula was
merged in.
Merged some cosmetic changes from Lite2, rev.1.21 and Lite1. The merge
was difficult because the Lite2 code is essentially ours (phk's) except
where Lite2 improved or broke it.
Summary of the Lite2 changes:
- in the copyright, phk's rights have been transferred to the Regents.
This change should be reviewed.
- nchENOENT went away; the "no" vnode is now simply 0.
- comments were improved.
- style was "improved".
- goto instead of Fanatism (sic) was considered bad :-).
- there are some small changes to support whiteouts.
- new cache entries are added in more cases. More work is required
near here to change the hash table size if kern.desiredvnodes is
changed using sysctl.
- rescanning of the hash bucket in cache_purgevfs() was removed. This
change should be reviewed.
Allow comments in password database. The comments are copied from
the password file into /etc/master.passwd and optional (-p) into
/etc/passwd. Enable this feature with the compile
option -DPASSWD_IGNORE_COMMENTS.
The character `#' introduces a comment. Leading spaces and tabs are
ignored: '^[ \t]*#.*\n$'
Count an empty line - only spaces, tabs or newline - also as a comment.
An empty line at the bottom of /etc/master.passwd is a common
novice error and increased my mail load: '^[ \t]*\n$'
Unpend all killing signals to shut down this thing immediately,
or it is impossible to kill it in some situations.
Unpend yet one SIGARLM (see timer.c commit)
Don't pend SIGALRM (Timer Service) due to
1) When carrier dropped, old variant often forget to detect it cause
unkillable loop forever (because SIGTERM pended too, but it will be
separate commit)
2) Time intervals accuracy reasons
John Dyson [Sat, 8 Mar 1997 04:33:47 +0000 (04:33 +0000)]
When removing IN_RECURSE support during the Lite/2 merge, read/write
to/from mmaped regions was broken. This commit fixes the breakage, and
uses the new Lite/2 locking mechanisms.
Kazutaka YOKOTA [Fri, 7 Mar 1997 10:22:55 +0000 (10:22 +0000)]
Made set_controller_command_byte() less verbose. It used to print a
debug message whenever one of lock keys were pressed, if the system
was started with the `-v' option.
Joerg Wunsch [Fri, 7 Mar 1997 08:56:00 +0000 (08:56 +0000)]
Fix a bogon in pcvt that caused a characterset designation to not take
effect immediately, but required a following (normally redundant) G0
into GL mapping. This adds one layer of indirection (thus might make it
slower), but fixes the broken box character drawing in pcvt.
Hellmuth and Bruce are unfortunately too busy too review this right now,
but i wanna have it in 2.2 since it has often been asked in the past.
Brian Somers [Fri, 7 Mar 1997 01:34:47 +0000 (01:34 +0000)]
Add a -s option for setting the current vty. This should make
life easier if a PS/2 mouse locks up the keyboard (frequent-ish,
but not repeatable).
Tidy up code (a bit) and make it -Wall
Is this a 2.2 candidate ? (although it doesn't -Wall in 2.2 because
of the lack of sys/sysproto.h
Joerg Wunsch [Thu, 6 Mar 1997 22:24:04 +0000 (22:24 +0000)]
Don't clobber the TERM variable if it's already set (e.g. from /etc/ttys,
or from a telnet session). So basically, this setting will only get in
effect in the single-user shell.
Joerg Wunsch [Thu, 6 Mar 1997 15:36:45 +0000 (15:36 +0000)]
Merge Jason Thorpe's updated changer stuff into the actual system.
Many things have been changing in the kernel since mid-1996, so there's
quite some amount of diffs here already. It compiles, but i cannot
test it anywhere here.