julian [Mon, 19 Aug 1996 20:07:07 +0000 (20:07 +0000)]
Collect all the functioons concerned with rebooting into one place
also add the at_shutdown callout list, and change the one user of
the present (broken) method (the vn driver) to use the new scheme.
peter [Mon, 19 Aug 1996 19:42:00 +0000 (19:42 +0000)]
Update some ancient warts in talk:
- use termios, not sgtty
- dont use _putchar(), that was a BSD-curses specific feature not in
other curses packages (such as ncurses)
- use sigaction, not sigvec while I'm there
- box() does different things under sysv/ncurses on 1-line high windows,
and BSD-curses doesn't have hline(), so do it by adding characters
instead. That works on both styles of curses.
julian [Mon, 19 Aug 1996 19:22:26 +0000 (19:22 +0000)]
for kern_conf.c, start allocating dynamic major numbers
half way through the range rather than possibly colliding with
fixed elements. Increase the size of the arrays to take this into account..
remember that each element in the array is now only 1 ponter so this
isn't that much..
also note a possible bug in debugging code in uipc_socket2.c (add XXX)
peter [Mon, 19 Aug 1996 14:27:14 +0000 (14:27 +0000)]
Define ETHERS_SERVICE, since our OS provides it. Otherwise, you
can't do a "tcpdump 'gateway foo'" unless it's in /etc/ethers - it wasn't
reading the NIS tables.
julian [Mon, 19 Aug 1996 03:32:10 +0000 (03:32 +0000)]
fix handling of external objects referenced by mbufs
somehow this got broken between 4.3 tahoe and here, though I've been using
these fixes for over a year here..
julian [Mon, 19 Aug 1996 02:28:24 +0000 (02:28 +0000)]
add callout lists for exit() and fork()
I've been meaning to do this for AGES as I keep having to patch those routines
whenever I write a proprietary package or similar..
any module that assigns resources to processes needs to know when
these events occur. there are existsing modules that should be modified
to take advantage of these.. e.g. SYSV IPC primatives
presently have #ifdef entries in exit()
this also helps with making LKMs out of such things..
julian [Mon, 19 Aug 1996 02:22:15 +0000 (02:22 +0000)]
Add man-pages for at_exit, at_fork and at_shutdown()
so that people can look and comment.
I'll add the at_fork and at_exit immediatly, but I'll
add teh at_shutdown later as it's more extensive
and I desire people's comments..
julian [Mon, 19 Aug 1996 02:19:23 +0000 (02:19 +0000)]
move all functions related to shutting down to one file
called kern_shutdown.c
note: I couldn't see anything machine dependant in the
functions boot() and dumpsys() which were in machdep.c
I have left a prototype for cpu_boot() which would go in
machdep.c, but I have nothing to put in it. Iexpect others will
let me know in no uncertain ways that this or that is machine dependant
and should be there, but I'll way for that to happen.. :)
I haven't actually taken the functions OUT of machdep
or anywhere else yet.. I'm checking in this file so others can have a look
at it and comment. SO PLEASE DO COMMENT!
I am also (in another checkin) addinf a man(9) page for the new
at_shotdown().. er freudian slip there.. at_shutdown() call
so have a look at that (and at_exit and at_fork as well)
and feed me comments..
I'll heck in the changes to make these (shutdown) changes active tomorrow
if no-one objects too strongly..
peter [Sun, 18 Aug 1996 16:16:18 +0000 (16:16 +0000)]
make the declaration of the __error() function C++ safe. Otherwise,
the linker comes up with undefined variables because of the #define errno
when using _THREAD_SAFE.
peter [Sun, 18 Aug 1996 16:14:03 +0000 (16:14 +0000)]
Add __unused to the list of __dead, __dead2, __pure, __pure2 etc.
gcc-2.7 has __attribute__((unused)) as a postfix operator on function
arguments to prevent -Wunused from complaining about them. gcc < 2.7
doesn't have anything like this (and doesn't care about it either).
eg:
int foo(bar, baz)
int bar __unused; /* needed because of function pointer typing */
char *baz __unused;
{
return (1);
}
wosch [Sun, 18 Aug 1996 12:47:33 +0000 (12:47 +0000)]
new section ``Unix history''
* Saulus, Peter H. _A quarter century of UNIX_.
* Simon Garfinkel, Daniel Weise, Steven Strassmann.
_The UNIX-HATERS Hanbook_.
peter [Sat, 17 Aug 1996 10:37:28 +0000 (10:37 +0000)]
Fixes from NetBSD:
- inet_ntoa() returns a pointer to a static buffer, dont use it twice
in the same printf().
- prevent the possibility of never timing out
- Report two more ICMP error types (prohibited nets etc)
And some (commented out) enhancements that I use, but some don't like.
asami [Sat, 17 Aug 1996 10:16:02 +0000 (10:16 +0000)]
(1) Ignore patches directory without a patch with a message instead of
bombing mercilessly.
(2) If that directory has a directory called CVS, remind the user of
the existence of the "-P" option to cvs co and update.
(3) While I'm here, clean up the PATCH_DEBUG code a bit. In
particular, don't duplicate a whole bunch of code just for adding
a single "echo" statement. ;)
peter [Sat, 17 Aug 1996 07:15:38 +0000 (07:15 +0000)]
Put on my flame-proof suit and attempt to make the /etc/motd banner
editor safer. The old one was too deadly, if the blank line after the
"FreeBSD" version banner was missing, it would delete from the beginning
of the file up until the next blank line, possibly to the end of file.
This was not good.
peter [Fri, 16 Aug 1996 10:16:32 +0000 (10:16 +0000)]
restore nsccons variable from rev 1.115 that was deleted in rev 1.136
during phk's staticize/cleanup commits. pstat needs it, the MAXCONS
option is not visible anywhere else, and pstat uses it to find the bounds
of the sccons[MAXCONS] array, which varies.
jkh [Fri, 16 Aug 1996 07:53:29 +0000 (07:53 +0000)]
Go back to sigaction again now that Peter has found the problem.
Mine was just a "let's move on" kinda fix, Peter's does it right. :) Submitted-by: peter
jkh [Thu, 15 Aug 1996 21:06:52 +0000 (21:06 +0000)]
Make libncurses catch SIGWINCH and update the values for LINES and COLS.
I was perplexed when an example I'd written to show the values for these
variables changing as an xterm window was resized didn't work, and looking
into it I see that size tracking for LINES and COLS seems to be one SVR4
enhancement which didn't come across with libncurses.
jkh [Thu, 15 Aug 1996 20:15:18 +0000 (20:15 +0000)]
Add something so that you can solve the puzzle automatically by pressing
`a' (I'm using this code as a test for something else, and just happened
to add this in the process :).
smpatel [Thu, 15 Aug 1996 16:33:32 +0000 (16:33 +0000)]
Fix fdavail() so that correctly pays attention to the rlimit.
Fixes unp_externalize panic which occurs when a process is at it's
ulimit for file descriptors and tries to receive a file descriptor from
another process.
dyson [Thu, 15 Aug 1996 06:45:01 +0000 (06:45 +0000)]
Certain vnode buffer list operations were not being spl protected,
and they needed to be. Brelse for example can be called at interrupt
level, and the buffer list operations were not being protected from it.
julian [Tue, 13 Aug 1996 22:20:20 +0000 (22:20 +0000)]
Submitted by: Archie@whistle.com
if making a interface route, and it's a P2P link,
then also automatically lable it as an llinfo entry so that
gated and friends don't clobber it..
julian [Tue, 13 Aug 1996 19:48:41 +0000 (19:48 +0000)]
Submitted by: doug Rabson (dfr@render.com)
cleaning up some of the vnode usage..
(I'm sure it still needs more..)
where can one find out what each vfs call expects to be locked
on completion, and how can one find out what each layer expects
to be freed on error.?
pst [Tue, 13 Aug 1996 19:43:41 +0000 (19:43 +0000)]
Completely rewrite handling of protocol field for firewalls, things are
now completely consistent across all IP protocols and should be quite a
bit faster.
pst [Tue, 13 Aug 1996 19:43:24 +0000 (19:43 +0000)]
Completely rewrite handling of protocol field for firewalls, things are
now completely consistent across all IP protocols and should be quite a
bit faster.
Use getprotoname() extensively, performed minor cleanups of admin utility.
The admin utility could use a good kick in the pants.
Basicly, these were the minimal changes I could make to the code
to get it up to tollerable shape. There will be some future commits
to clean up the basic architecture of the firewall code, and if
I'm feeling ambitious, I may pull in changes like NAT from Linux
and make the firewall hooks comletely generic so that a user can
either load the ipfw module or the ipfilter module (cf Darren Reed).
peter [Tue, 13 Aug 1996 17:49:45 +0000 (17:49 +0000)]
Fix nasty bracketing/precedence bug. Every time something read (and
refilled) a file that was either line- or un-buffered, all files were
flushed. According to the code comment, the flush (according to ANSI)
is supposed to happen on write + line buffered output files, not _all_
files.
Obtained from: OpenBSD / Theo de Raadt, possibly from proven@cygnus.com