Commit Graph

763 Commits

Author SHA1 Message Date
bde
dc86db9afc Disabled the sleep in ttyflush(). It can't work in general because
ttyflush() might be called from an interrupt handler.  This fixes
panics in IXOFF mode at the cost of more failures to send the START
character to exit from IXOFF mode.
1995-12-15 01:01:00 +00:00
bde
29203d43e3 Fixed staticization of DDB functions. 1995-12-14 23:01:51 +00:00
bde
17e4e14428 Nuked ambiguous sleep message strings:
old:				new:
	netcls[] = "netcls"		"soclos"
	netcon[] = "netcon"		"accept", "connec"
	netio[] = "netio"		"sblock", "sbwait"
1995-12-14 22:51:13 +00:00
bde
72a113a4d5 Restored unused function ttrstrt(). It would be used if the low level
drivers supported inter-character delays.
1995-12-14 22:32:52 +00:00
peter
ae7714f542 GENERIC/LINT: Remove redundant quoting on some option lines.
LINT: add a couple of new/missing/undocumented options
files.i386: add linux code so that you can compile a kernel with static
linux emulation ("options LINUX")
i386/*: use #if defined(COMPAT_LINUX) || defined(LINUX) to enable static
support of linux emulation (just like "IBCS2" makes ibcs2 static)

The main thing this is going to make obvious, is that the LINUX code
(when compiled from LINT) has a lot of warnings, some of which dont look
too pleasant..
1995-12-14 14:35:36 +00:00
phk
50d195499f Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
phk
c16e905bcf A Major staticize sweep. Generates a couple of warnings that I'll deal
with later.
A number of unused vars removed.
A number of unused procs removed or #ifdefed.
1995-12-14 08:32:45 +00:00
phk
4f5f364765 Make math_emulators LKMable. 1995-12-14 08:21:33 +00:00
julian
c685779913 devsw tables are now arrays of POINTERS to struct [cb]devsw
seems to work hre just fine though  I can't check every file
that changed due to limmited h/w, however I've checked enught to be petty
happy withe hte code..

WARNING... struct lkm[mumble] has changed
so it might be an idea to recompile any lkm related programs
1995-12-13 15:13:57 +00:00
dyson
a3a5fa47dd Fix a problem that was caused by new (partial) support for merged cache
metadata and VBLK type devices.  The code is currently mostly disabled,
and a work-around has been added to disabled attempted clustered writes
for VBLK type device buffers.  Clustered write of meta-data is currently
a work in progress.
1995-12-13 03:47:01 +00:00
dyson
f5d340604a This should have fixed some conditions that could cause the
"getblk" hang.  The B_WANTED flag was being cleared gratuitously,
also the optimization of gbincore for ignoring the B_INVAL flag was
incorrect.  There is no place in the code where buffers are on the
hash list that are B_INVAL and not B_BUSY.
1995-12-12 04:18:10 +00:00
dyson
a3d5209b62 Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
1995-12-11 04:58:34 +00:00
bde
faa367e907 Removed new alias d_size_t for d_psize_t.
Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and
d_devtotty_t.

Sorted declarations of switch functions into switch order.

Removed duplicated comments and declarations of nonexistent switch
functions.
1995-12-10 15:55:34 +00:00
phk
525bf31859 Last commit this round: Staticize.
we are now down to about 1146 symbols being global, of which
I estimate that about 100 are validly so.
1995-12-10 13:45:30 +00:00
phk
0b2545a02a Remove various unused symbols and procedures. 1995-12-09 20:40:43 +00:00
phk
6338f54c5f Move sysctl machdep.consdev to cons.c 1995-12-09 20:39:47 +00:00
peter
196f865c25 Reorganise ps_strings in order to gain BSD/OS 2.0 binary compatability.
This is now in line with NetBSD as well..

Note that once this series of commits is finished, you must recompile
libkvm, then ps and maybe 'w'.  If you are running the recently imported
sendmail-8.7, you should recompile that too (src/conf.c at least).
1995-12-09 04:29:11 +00:00
phk
34914741e3 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
julian
2a6a55ef99 Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
dg
f102a0eacf Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
bde
757094581a Removed unnecessary #includes of vm stuff. Most of them were once
prerequisites for <sys/sysctl.h>.

subr_prof.c:
Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>.
1995-12-06 23:37:44 +00:00
bde
0e641944e1 Don't #include vm stuff in vnode_if.[ch]. Enough vm stuff (a
single typedef) is now declared in <sys/types.h>.

This is the first of 4 commits that will remove some excessive
includes of vm*.h and user.h.  The total speed improvement isn't
as large as I first thought.  `make depend; make' for LINT only
improved from 2180 seconds to 2108 seconds user time.
1995-12-06 23:33:39 +00:00
phk
058c5cee9e A couple of minor tweaks to the sysctl stuff. 1995-12-06 13:27:39 +00:00
bde
f548c47780 Include <vm/vm.h> or <vm/vm_page.h> explicitly to avoid breaking when
vnode_if.h doesn't include vm stuff.
1995-12-05 21:51:45 +00:00
phk
27e3e437a7 A major sweep over the sysctl stuff.
Move a lot of variables home to their own code (In good time before xmas :-)

Introduce the string descrition of format.

Add a couple more functions to poke into these marvels, while I try to
decide what the correct interface should look like.

Next is adding vars on the fly, and sysctl looking at them too.

Removed a tine bit of defunct and #ifdefed notused code in swapgeneric.
1995-12-04 16:48:58 +00:00
jkh
dfa19e9278 Close PR: kern/865
Submitted by:	Juergen Lock <nox@jelal.hb.north.de>
1995-12-04 02:26:53 +00:00
bde
7ec1b3fb8c Oops, the last commit left a redundant declaration. 1995-12-03 18:00:35 +00:00
bde
41dcd73395 Completed function declarations and/or added prototypes. 1995-12-02 18:58:56 +00:00
bde
8c6f875d7a Finished (?) cleaning up sysinit stuff. 1995-12-02 17:11:20 +00:00
bde
b985cfd178 Staticized.
Added prototypes.
1995-12-02 16:32:03 +00:00
julian
01bd537d94 I fixed this before than committed it on my machine and not on freefall.
(window confusion)
1995-12-02 13:08:20 +00:00
julian
9f1e55b200 Submitted by: Heikki Suonsivu
Made the pty devices creates in devfs match the present MAKEDEV naming
1995-12-02 07:30:19 +00:00
julian
bad59b8685 Submitted by: jb@cimlogic.com.au (John Birrell)
Obtained from:  NetBSD as well (He submitted it there too)

make sure that teh shm region is beyond the sum of the text and data segs
as it was big progs could collide with the shm region.
1995-11-30 07:58:50 +00:00
julian
5ad930b86a A pair of really tiny patches that not only allow it all to compile
but also IT ACTUALLY WORKS!
FreeBSD with options  JREMOD now runs with no entries in the devsw tables
prior to the devices puting their own entries there..

Thanks to bde and terry for thoughts and comments.
next stop 'Real' devfs support in devices.
1995-11-30 05:59:09 +00:00
wollman
7a30acc257 Disallow LKM manipulations when in seure mode.
Noticed by: bde
1995-11-29 17:45:59 +00:00
julian
6458dd5afd If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
julian
5ed45e9584 #ifdef out nearly the entire file of conf.c when JREMOD is defined
add a few safety checks in specfs because
now it's possible to get entries in [cd]devsw[] which are ALL NULL
so it's better to discover this BEFORE jumping into the d_open() entry..

more check to come later.. this getsthe code to the stage where I
can start testing it, even if I haven't caught every little error case...
I guess I'll find them quick enough..
1995-11-29 12:38:49 +00:00
phk
21d20714f1 A test was backwards.
Noticed by:	Cheng, Hsiao-Yang <sycheng@cis.ufl.edu>
1995-11-29 11:28:00 +00:00
julian
6c979de707 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +00:00
bde
b50523c7b3 Removed all #includes of the unused file <sys/device.h>. 1995-11-28 07:29:59 +00:00
peter
f22c665f0e Implement read/write to kernel space - I use this for a self-loading/
self-decompressing ram disk that I'm fiddling with..

(Note, this depends on the various syscalls having correctly set uio_segflag
 before calling physio - I've checked and they look correct.)
1995-11-28 02:40:38 +00:00
dyson
190351e34f Update the wd.c driver to use the new TAILQ scheme for device
buffer queue.  Also, create a new subroutine 'tqdisksort' that
is an improved version of the original disksort that also uses
TAILQs.
1995-11-23 07:24:41 +00:00
phk
a341547c98 Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things.
the devconf stuff is the reason for the large number of files.
Cleaned up some compiler warnings while I were there.
1995-11-20 12:42:39 +00:00
phk
6ec6816809 Put cbstat() under #ifdef DDB 1995-11-20 12:15:45 +00:00
phk
6301d32913 Remove unused var. 1995-11-20 12:14:40 +00:00
phk
748a253862 Close the "unused" warning for things in linker-sets.
This will also allow us to catch typos in the setname by running a
nm through a grep.
1995-11-20 12:08:08 +00:00
dyson
088b4381b3 Yet another small block FS bug fix. 1995-11-20 04:53:45 +00:00
dyson
2d361da6e2 Fix more clustering bugs for FSes with block sizes < PAGE_SIZE. 1995-11-20 03:55:48 +00:00
dyson
eb7795045f Changed an incorrect splhigh to splbio. 1995-11-19 20:42:25 +00:00
dyson
6f8f886a41 General fixes to the vfs clustring code:
1) Make cluster buffer list be a non-malloced chain.  This eliminates
yet another 'evil' M_WAITOK and generally cleans up the code.
2) Fix write clustering for ext2fs.  It was just broken.  Also, ffs
clustering had an efficiency problem that more bawrites were happening
than should have been.
3) Make changes to buf.h to support the above, plus remove b_pfcent
at the request of David Greenman.
Reviewed by: davidg (partially)
1995-11-19 19:54:31 +00:00
bde
59dcd1177f Fixed settimeofday():
- don't allow invalid timevals.
- normalize timevals as they are built - don't call timevaladd() with
  a possibly invalid timeval and normalize the result.

Fixed a warning.
1995-11-19 00:59:22 +00:00
dyson
1e8323a784 Added a missing splx(s). 1995-11-18 23:33:48 +00:00
bde
bbfa57541d Fixed the errno returned by rename("dir1", "dir2/."). It was EISDIR
(duh); translate it to EINVAL which is the errno for other renames
to ".".
1995-11-18 11:35:05 +00:00
bde
87f9f11bbb Improved formatting.
Added a comment about possibly better handling of INPCK.

Added a prototype.
1995-11-18 11:07:00 +00:00
bde
eeec8e6ecb Cleaned up SA_NODEFER changes.
Added prototypes.
1995-11-18 10:01:38 +00:00
phk
722156b7d3 All net.* sysctl converted now. 1995-11-16 19:00:27 +00:00
bde
14ef76a7a6 Fixed support for DIAGNOSTIC option. SYSCTL_INT() depends on kernel.h. 1995-11-16 09:45:23 +00:00
phk
284fa13556 Do what is generally belived to be the right thing, though it may not be :-) 1995-11-14 20:43:29 +00:00
phk
905140e5b3 Final part of this bunch of sysctl commits: cleanup. 1995-11-14 09:42:22 +00:00
phk
7059448927 Get rid of the last debug sysctl variables of the old style. 1995-11-14 09:40:06 +00:00
phk
6a20ef2ab7 Get rid of hostnamelen variable. 1995-11-14 09:37:22 +00:00
phk
757c6d624a Move all the VM sysctl stuff home where it belongs. 1995-11-14 09:29:34 +00:00
phk
37f69639f6 A couple of nitpicks. 1995-11-14 09:26:17 +00:00
phk
8ea3d51732 Convert dumpdev & securelevel. 1995-11-14 09:22:15 +00:00
phk
c274257d99 Change some of the debug sysctl vars. The semantics of these will change. 1995-11-14 09:19:16 +00:00
phk
9c28488439 KERN_MAXFILESPERPROC, KERN_MAXFILES went to another file. 1995-11-14 09:17:32 +00:00
phk
01d7e0744e Hmm, I seem to have got all my patches screwed up anyway. Too bad.
this is where the proctable stuff went.
1995-11-14 09:16:27 +00:00
phk
bf678d7839 Get rid of domainnamelen. 1995-11-14 09:10:54 +00:00
phk
1578d477f4 Move KERN_NTP to a more suitable file. 1995-11-14 09:07:14 +00:00
phk
312405b6c6 Move the process-table stuff to a more suitable file.
Remove filetable stuff from kern_sysctl.c
1995-11-14 09:05:40 +00:00
phk
71fc41f8bf Add new-style sysctl for KERN_FILE here. 1995-11-14 08:58:35 +00:00
phk
9b739b48f8 Try to make my new scheme work more along the lines of the manual.
There are still some gray areas here and there.
1995-11-13 13:54:09 +00:00
dg
5b687ce469 Use kmem_alloc_pageable/kmem_free to allocate memory instead of individual
VM map functions.
1995-11-13 10:45:22 +00:00
bde
7bd8f31743 Fixed a cast in olseek().
Fixed confusing order of declarations of getvnode()'s args.
1995-11-13 08:22:21 +00:00
phk
62affbf028 The entire sysctl callback to read/write version. I havn't tested this as
much as I'd like to, but the malloc stunt I tried for an interim for
sure does worse.
Now we can read and write from any kind of address-space, not only
user and kernel, using callbacks.
This may be over-generalization for now, but it's actually simpler.
1995-11-12 19:52:09 +00:00
bde
b064faa587 Restored the (buggy) historical behaviour of getdomainname().
Negative name lengths for getdomainname() and setdomainname() were
converted to large positive ones by misdeclaring the args struct.
1995-11-12 07:04:30 +00:00
bde
158d004344 Included <sys/sysproto.h> to get central declarations for syscall args
structs and prototypes for syscalls.

Ifdefed duplicated decentralized declarations of args structs.  It's
convenient to have this visible but they are hard to maintain.  Some
are already different from the central declarations.  4.4lite2 puts
them in comments in the function headers but I wanted to avoid the
large changes for that.
1995-11-12 06:43:28 +00:00
bde
d350ef5bcb Updated machine-generated files. 1995-11-12 04:29:37 +00:00
bde
43f7d998c1 Fixed the args list for mount(). We're not ready for the BSD4.4lite2/
NetBSD interface.

Increased the bogusness of the args list for mmap().  The args lists for
most of the memory mapping functions are bogus.  The args lists in
syscalls.master are a little better than the ones in the args structs
currently being used, but the improvement for mmap() changed the object
code and I don't want to worry about that now.

Increased the bogusness of the args list for fcntl.  BSD4.4lite2/NetBSD
uses `void *' instead of int for the third arg.  This has the advantage
of working when `void *'s are longer than ints, but requires extra bogus
casts that I hope to avoid.

Fixed the args list for uname.  `struct outsname' seems to be a typo,
not an old interface.

Added comments about bogus args lists for open, mount, msync, munmap,
mprotect, madvise, mincore, fcntl, semsys, msgsys and shmsys.
1995-11-12 04:24:53 +00:00
bde
7f3c7b77cb Fixed the type of readv(). An args struct member name conflicted with the
machine-generated one in <sys/sysproto.h>.
1995-11-11 06:57:34 +00:00
bde
3091000682 Fixed type of setsid(). It used used the bogus `getsid_args'. 1995-11-11 06:53:08 +00:00
bde
9385ea7886 Removed unreachable code.
Changed `#if defined()' back to `#ifdef' to finish removing COMPAT_IBCS2.
1995-11-11 05:49:22 +00:00
bde
39d3df9374 Fixed types of rtprio(), osetrlimit() and setrlimit(). The args struct
tag and/or member names conflicted with the machine generated ones in
<sys/sysproto.h>.
1995-11-11 01:48:17 +00:00
bde
2fe4853fac Fixed types of ogethostid() and osethostid(). The args struct names
conflicted with the machine generated ones in <sys/sysproto.h>.

Fixed type of oquota().  It didn't even use an args struct.
1995-11-11 01:04:42 +00:00
bde
00e02fe516 Fixed type of vfs_free_netcred().
Removed redundant declaration of insmntque().
1995-11-11 00:27:00 +00:00
bde
2e99f684c7 Fixed type of sysctl_order_cmp().
KNFized sysctl_order_cmp().
Staticized definition of kern_sysctl() to match its declaration.
1995-11-11 00:09:21 +00:00
phk
020de9066a Fix a minor buglet. 1995-11-10 16:22:41 +00:00
phk
59b0af5eb3 convert more sysctl variables. 1995-11-10 09:58:53 +00:00
phk
6b38ef7018 Make the old compat functions use the sysctl front door, rather than
crashing through the walls.
This should save Peters blood pressure and netscapes uname call.
1995-11-09 20:22:12 +00:00
bde
c9926c5eef Introduced lkm_nullcmd(), which will be used instead of nosys() in
some places to fix type mismatches.

Added prototypes and bogus casts.
1995-11-09 09:43:32 +00:00
bde
3b013c1295 Introduced a type `vop_t' for vnode operation functions and used
it 1138 times (:-() in casts and a few more times in declarations.
This change is null for the i386.

The type has to be `typedef int vop_t(void *)' and not `typedef
int vop_t()' because `gcc -Wstrict-prototypes' warns about the
latter.  Since vnode op functions are called with args of different
(struct pointer) types, neither of these function types is any use
for type checking of the arg, so it would be preferable not to use
the complete function type, especially since using the complete
type requires adding 1138 casts to avoid compiler warnings and
another 40+ casts to reverse the function pointer conversions before
calling the functions.
1995-11-09 08:17:23 +00:00
phk
f4a53cb994 Fix some of the sysctl broke, and add a lot more to it. 1995-11-08 08:48:36 +00:00
dyson
ec8567ed15 This is a modification missed by me in the msync fixes a few days ago. 1995-11-07 05:09:43 +00:00
phk
168f72408f On working the new sysctl vars a bit I realized that I needed more generality.
This is here now.  We can now access (the new) sysctl variables from the
kernel too and using functions to handle access is more sane now.
I will now attack sysctl variables in the rest of the kernel and get them
all converted to newspeak.
1995-11-06 16:18:52 +00:00
dg
2442a8a02f All:
Changed vnodep -> vp for consistency with the rest of the kernel, and
changed iparams -> imgp for brevity.

kern_exec.c:
   Explicitly initialized some additional parts of the image_params struct
to avoid bzeroing it. Rewrote the set-id code to reduce the number of
logical tests. The rewrite exposed a mostly benign bug in the algorithm:
traced set-id images would get ktracing disabled even if the set-id didn't
happen for other reasons.
1995-11-06 12:52:37 +00:00
bde
7c859aa27a Replaced bogus macros for dummy devswitch entries by functions.
These functions went away:

	enosys (hasn't been used for some time)
	enxio
	enodev
	enoioctl (was used only once, actually for a vop)

if_tun.c:
Continued cleaning up...

conf.h:
Probably fixed the type of d_reset_t.  It is hard to tell the correct
type because there are no non-dummy device reset functions.

Removed last vestige of ambiguous sleep message strings.
1995-11-06 00:36:19 +00:00
dyson
84bc20c709 Make MNT_ASYNC more effective for UFS. It should not be too much more
dangerous than the original MNT_ASYNC.  There might be some minor
security considerations due to data writes not being posted as promptly
as before.  Meta-data operations are still not quite as fast as Linux,
but streaming I/O is still higher.
1995-11-05 21:01:15 +00:00
dyson
a17da64e7c Greatly simplify the msync code. Eliminate complications in vm_pageout
for msyncing.  Remove a bug that manifests itself primarily on NFS
(the dirty range on the buffers is not set on msync.)
1995-11-05 20:46:03 +00:00
bde
7d2adfeaf2 Replaced bogus macros for entry points to unconfigured line disciplines
by functions.

tty_conf.c:
Cleaned up formatting of tables.

Removed another ARGSUSED for consistency.

conf.h:
Introduced typedefs for line discipline functions.

Backed out most of previous revision (it is done elsewhere).
1995-11-05 20:25:59 +00:00
bde
1bc5fa9c2e Moved prototypes for devswitch functions from conf.c and driver sources
to <machine/conf.h>.  conf.h was mechanically generated by
`grep ^d_ conf.c >conf.h'.  This accounts for part of its ugliness.  The
prototypes should be moved back to the driver sources when the functions
are staticalized.
1995-11-04 13:25:33 +00:00