Commit Graph

185 Commits

Author SHA1 Message Date
bde
21b8e34614 Added parameter names to prototypes that were added in the last commit to
match nearby style.
1997-02-12 14:45:23 +00:00
bde
05eea2d8f0 Restored #include of <sys/kernel.h> so that this compiles again. 1997-02-12 14:31:11 +00:00
mpp
11081f2076 Add function protypes for the new Lite2 unionfs functions. 1997-02-12 07:54:22 +00:00
mpp
50f9d7b978 Add function prototypes for most of the new Lite2 functions.
Also made a few of the miscfs routines static to be
consistent.  Some modules simply required some additional
#includes to remove -Wall warnings.
1997-02-12 06:52:51 +00:00
dyson
10f666af84 This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>
1997-02-10 02:22:35 +00:00
dyson
52f682b582 Change the map entry flags from bitfields to bitmasks. Allows
for some code simplification.
1997-01-16 04:16:22 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
bde
d837023225 Fixed lseek() on named pipes. It always succeeded but should always fail.
Broke locking on named pipes in the same way as locking on non-vnodes
(wrong errno).  This will be fixed later.

The fix involves negative logic.  Named pipes are now distinguished from
other types of files with vnodes, and there is additional code to handle
vnodes and named pipes in the same way only where that makes sense (not
for lseek, locking or TIOCSCTTY).
1996-12-19 19:42:37 +00:00
bde
e18fda9e89 Fixed errno for unsupported advisory locks. The errno is now EINVAL
fcntl() and EOPNOTSUPP for flock().  POSIX specifies the weaker EINVAL
errno and the man page agrees.

Not fixed:
deadfs: always returns wrong EBADF
devfs, msdosfs: always return sometimes-wrong EINVAL
cd9660, fdesc, kernfs, portal: always return sometimes-wrong EOPNOTSUPP
procfs: always returns wrong EIO
mfs: panic?!
nfs: fudged

NetBSD uses a generic file system genfs to do return the sometimes-wrong
EOPNOTSUPP more consistently :-)(.

Found by:	NIST-PCTS
1996-12-19 18:16:33 +00:00
julian
534a4e360d changes to make devfs more 'normal'
also fixes a bug I've been chasing for a LONG TIME,
due to the fact that spec_bwrite is a NOP and I didn't realise it..

old symptom:
mount -t devfs devfs /mnt
mount /mnt/wd0e /mnt/mnt2
umount /mnt2 <process hangs>

there are some pretty large structural differences internal to devfs
but outwards it should look the same.
I have not yet tested extensively but will do so and fix 3 warnings tomorrow.
1996-11-21 07:19:00 +00:00
dyson
89da5daba5 Fix a potential deadlock from the previous commit. 1996-10-30 03:52:57 +00:00
dyson
0cadb84d6a Fix the /proc/???/map file so that it is possible to read an arbitrarily
large process map.  Another commit will follow to fix a problem just found
during this one... Sorry!!! :-(.
1996-10-30 03:45:00 +00:00
phk
dda935f024 devfs_tree.c: improve our bdevvp() function.
devfs_vnops.c:	move a debug printf to be consistent.
1996-10-28 11:36:06 +00:00
dyson
1b9def83a5 Fix setting breakpoints in shared regions. 1996-10-24 02:47:05 +00:00
julian
70536e45de Just because something doesn't make sense doesn't mean it should be illegal..
just ignore it instead.
===================================================================
RCS file: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v
retrieving revision 1.30
diff -r1.30 devfs_vnops.c
631d630
<           (vap->va_size != VNOVAL) || /* doesn't make sense in devfs */
1996-10-17 22:47:23 +00:00
julian
1fc5d71cd6 actually impliment permissions for teh chown/chmod/etc functions
that resemble what the man pages say.
also fix braino (type last week)
1996-10-16 23:14:00 +00:00
julian
9ff5511188 Allow the utimes call to work on devfs nodes. 1996-10-16 18:02:53 +00:00
julian
4485d0a878 reads and writes to devices update m and a times
add some security onn the chmod/chown operations
should now be root or owner
(still needs more thought but kinda-plugs tow holes pointed out by bde)
1996-10-12 00:07:53 +00:00
dyson
a448864d51 Substitution of a long divide by a shift. Other cosmetic improvements.
Submitted by:	bde
1996-10-06 21:19:33 +00:00
bde
796679c034 Started unspamming <sys/systm.h>. Don't include <machine/stdarg.h>
to get the declaration of va_list; just use _BSD_VA_LIST.  Fixed
the 2 places that need <machine.stdarg.h> but didn't include it
explicitly.
1996-09-29 15:00:37 +00:00
nate
41b14ae59f Whoops, I should've used the LINT config file. More ts -> tv changes
for timespec structure.
1996-09-20 05:56:36 +00:00
julian
c60a92f885 fix the ability of the VFS to reclaim devfs nodes correctly..
(was resulting in panics, especially when DIAGNOSTIC was set.)
1996-09-11 07:52:18 +00:00
bde
25556c3b93 Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
bde
51ff523803 Eliminated nested include of <sys/unistd.h> in <sys/file.h> in the kernel.
Include it directly in the few places where it is used.

Reduced some #includes of <sys/file.h> to #includes of <sys/fcntl.h> or
nothing.
1996-09-03 14:25:27 +00:00
bde
070eb30ca6 Fixed the easy cases of const poisoning in the kernel. Cosmetic. 1996-08-31 16:52:44 +00:00
dyson
966cbc5d29 Even though this looks like it, this is not a complex code change.
The interface into the "VMIO" system has changed to be more consistant
and robust.  Essentially, it is now no longer necessary to call vn_open
to get merged VM/Buffer cache operation, and exceptional conditions
such as merged operation of VBLK devices is simpler and more correct.

This code corrects a potentially large set of problems including the
problems with ktrace output and loaded systems, file create/deletes,
etc.

Most of the changes to NFS are cosmetic and name changes, eliminating
a layer of subroutine calls.  The direct calls to vput/vrele have
been re-instituted for better cross platform compatibility.

Reviewed by: davidg
1996-08-21 21:56:23 +00:00
julian
a5c4b94299 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.?
1996-08-13 19:48:41 +00:00
julian
2fd72b710b symlink support in devfs.
it only barely works so don't get too carried away..
I noticed that teh symlink is length 0..
I guess I'll fix that tomorrow..
it also sometimes panics with "cleaned vnode isn't" but it's not more
broken than it was before.. I really want to go over it with someone
who understands the lifecycle of a vnode better than I do..

terry?
kirk?
david?
john?
1996-08-13 07:21:45 +00:00
bde
63ae415aca Only use the special bdevvp() for DEVFS if DEVFS_ROOT is defined. This
makes option DEVFS safe to use again (although mounting devfs is unsafe).
1996-07-30 18:00:32 +00:00
dyson
844ec1f2c0 Modify slightly the output from the map file in /proc. Now the
executable bit is shown.
1996-07-27 19:47:04 +00:00
dyson
3695a87050 Under certain circumstances, reading the /proc/*/map file can
crash the system.  Nonexistant objects were not handled correctly.
1996-07-27 18:28:10 +00:00
dyson
b19b6d252f Remove a totally unneeded (and as of the last VM commit, incorrect) call
to pmap_clear_modify.
1996-07-27 03:50:31 +00:00
phk
1e7e8dfc1e DEVFS needs a special bdevvp().
I just noticed some junk in my patch.  I'll remove that in a sec.
1996-07-24 21:22:36 +00:00
phk
21c02482c0 Comment out rootdev & rrootdev so a ls -l doesn't panic the machine. 1996-07-03 03:48:46 +00:00
dyson
835bc69189 Implement locking for pfs nodes, when at the leaf. Concurrent access
to information from a single process causes hangs.  Specifically, this
fixes problems (hangs) with concurrent ps commands, when the system is under
heavy memory load.
Reviewed by:	davidg
1996-07-02 13:38:10 +00:00
dyson
66550c3ffb Fix a serious problem, with a window where an object lock is needed,
but not there.  The extent of the object lock is expanded to be over the
range that it is needed.  Additionally, clean up the code so that it conforms
to better coding style.
1996-07-02 01:40:52 +00:00
dyson
da96599602 Add procfs_type.c to the repository. 1996-06-18 05:22:45 +00:00
dyson
01d0667f09 Clean-up the new VM map procfs code, and also add support for executable
format file "etype".  It contains a description of the binary type for
a process.
1996-06-18 05:16:00 +00:00
dyson
435fbbfe95 This file is the "meat" of the process address space capability. If you
would like other things added, just ask!!!  It might be pretty easy to add.
1996-06-17 22:53:27 +00:00
dyson
c74503c0b7 Add a feature to procfs to allow display of the process address map
with multiple entries as follows:

	start address, end address, resident pages in range, private pages
		in range, RW/RO, COW or not, (vnode/device/swap/default).
1996-06-17 22:43:36 +00:00
gpalmer
1e4006ada3 Cosmetic change: make the ``ready to run'' line match the
``ready for devices'' printed out earlier by changing `devs '
to be `DEVFS: '
1996-06-15 20:37:22 +00:00
gpalmer
57c3ebc617 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
gpalmer
d356aa8b62 Clean up -Wunused warnings. Julian asked me to just ifdef
out unused code as this is still work in progress.

Reviewed by:		bde
1996-06-12 05:08:34 +00:00
dg
5026fc1c36 Moved the fsnode MALLOC to before the call to getnewvnode() so that the
process won't possibly block before filling in the fsnode pointer (v_data)
which might be dereferenced during a sync since the vnode is put on the
mnt_vnodelist by getnewvnode.

Pointed out by Matt Day <mday@artisoft.com>
1996-06-12 03:37:57 +00:00
dyson
94ca54ddd2 Properly lock the vm space when accessing the memory in a process. This
fix could solve some "interesting" problems that could happen during
process rundown.
1996-06-11 23:52:27 +00:00
joerg
426074daf3 Fix the reproto.sh script that was broken after my KNFification.
Pointed out by: bde
1996-04-07 01:15:03 +00:00
joerg
427df293ee KNFify the function definitions. It's harder to grep around when the
function names don't start in column 1.
1996-04-06 13:34:37 +00:00
scrappy
2e8aad5ee1 Merged devfs_add_devsw() into devfs_add_devswf() 1996-04-03 03:03:27 +00:00
scrappy
52b6bf2e18 Made the src code match the man page.
Removed dev_link() and dev_linkf(), replacing dev_linkf() with devfs_link()
1996-04-02 04:53:05 +00:00
scrappy
745bb4c905 Added dev_linkf() function (dev_link() + printf-style arguments)
Reviewed by:	julian@freebsd.org
1996-03-28 14:32:27 +00:00