Commit Graph

190 Commits

Author SHA1 Message Date
scw 801242dfdc From patch supplied in PR-7951 by Joachim Kuebart:
Add support for Microsoft Joliet long filename extensions to the
cd9660 filesystem.
1999-07-13 11:12:05 +00:00
wrstuden 379a26972f Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.
1999-07-08 01:05:58 +00:00
tron c60bb946c2 Avoid lockups on cd9660 filesystems after attempt to open file for write.
Fix supplied by Zdenek Salvet in PR kern/7329.
1999-04-07 21:37:11 +00:00
kleink 9ee75a4fcc Add _PC_FILESIZEBITS to pathconf vnop. 1999-03-22 19:21:07 +00:00
wrstuden 862a56e88b Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.
1999-02-26 23:44:43 +00:00
is bfb7f2aaf3 Multisession-CD-Support, by Torsten Duwe <duwe@ns.lst.de>. 1999-01-04 15:32:08 +00:00
mycroft 68a70a83ba Check permissions on device to be mounted. 1998-09-05 04:34:47 +00:00
thorpej cf6b3d3ec9 Use the pool allocator and the "nointr" pool page allocator for cd9660 nodes. 1998-09-01 03:40:19 +00:00
kleink 5350df2953 Per POSIX, fail with EINVAL if advisory locking is attempted on a file type
that doesn't support it, rather than using a homegrown EBADF or EOPNOTSUPP.
1998-08-13 10:06:31 +00:00
matthias 574106c52b create miscfs/genfs/genfs_vnops.c:genfs_enoioctl and make all the other
filesystems use it instead of a private version.
1998-08-10 08:11:10 +00:00
perry e1601dc2ca bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:36:58 +00:00
kleink 12a866151b Recognize _PC_SYNC_IO. 1998-08-03 14:19:57 +00:00
jonathan d275e56dee * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00
thorpej 0f66e53c03 Use genfs_lease_check() 1998-06-25 22:20:39 +00:00
sommerfe 7ba7fbbb23 Always include fifos; "not an option any more". 1998-06-24 20:58:44 +00:00
sommerfe becaafeea0 defopt for options FIFO 1998-06-22 22:00:59 +00:00
cgd 651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
kleink d4a8052f98 Fix some arithmetics lossage on typeless pointers. 1998-05-08 18:31:13 +00:00
fvdl 9810527f1c Add NetBSD Id that got lost. 1998-03-01 02:27:49 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
fvdl e8d05f0741 Import 4.4BSD-Lite2 1998-03-01 02:12:49 +00:00
thorpej b5bf2ed6d0 Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().
1998-02-18 07:05:47 +00:00
chs f64abc7b4c add flags arg to hashinit(), to pass to malloc(). 1998-02-07 02:44:44 +00:00
christos e6f8df1a63 Add missing casts to nlink_t and dev_t 1997-10-16 23:56:57 +00:00
fvdl fd5433c6bc Bump last argument to VOP_READDIR to off_t (from u_long). 1997-10-10 01:57:31 +00:00
cgd 6ac982f2a0 mark prototypes for static inline functions as possibly unused (with
__attribute__ ((unused))), to avoid generating warnings when compiling
without optimization but with most ports' default warning flags.
1997-07-07 22:45:34 +00:00
pk b769cc2fb1 Remove initialization of `swapdev_vp' from mountroot(). 1997-06-13 15:38:58 +00:00
mycroft 5bd3538a41 Fix typo. 1997-05-08 16:43:16 +00:00
mycroft e3f99a9397 Pass the vnode type to vaccess(), and use it when checking VEXEC. Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.
1997-05-08 16:19:43 +00:00
mycroft 837a72363d VEXEC -> VLOOKUP, as appropriate. 1997-05-08 10:57:17 +00:00
mycroft 1e3c14a909 Eliminate bogus uses of V{READ,WRITE,EXEC}. Use S_I[RWX]{USR,GRP,OTH} where
appropriate.
1997-05-05 07:13:57 +00:00
kleink 9c16cd8a46 Implement a POSIX compliant genfs VOP_SEEK() and use it in the appropriate
places; by Chris G. Demetriou and myself.
1997-04-11 21:52:00 +00:00
thorpej f41783799b - Add cd9660_mountroot to cd9660_vfsops.
- Only attempt to mount root if root_device is a DV_DISK class device.
1997-01-31 02:23:25 +00:00
cgd 3d6d074161 make isonum_* functions 'static __inline' rather than 'extern __inline' 1997-01-24 18:31:47 +00:00
cgd 40a9eb327d fix typo 1997-01-24 00:46:49 +00:00
cgd 8e5fecbb35 add back isonum_7{21,22,31,32} functions. If we're going to define some of
these, we should define all, because there might be code elsewhere
that needs them (in this case, libsa).  Add comments that describe the
data types that the isonum_* functions access.
1997-01-24 00:44:40 +00:00
cgd 9586277088 update for iso.h/cd9660_extern.h header changes 1997-01-24 00:27:29 +00:00
cgd 18ed614151 split iso.h into two parts: iso.h (which now contains _only_ definitions
about ISO9660 file system structure), and cd9660_extern.h (which now
contains the definitions and data structures used by the kernel).
There's lots of other stuff scattered around this code that should go
into cd9660_extern.h, but doesn't need to right now.  This changed patterned
on ffs, which has 'fs.h' which describes the FS structure, and ffs_extern.h
for kernel-internals gunk.  Now libsa can include iso.h without the nasty
hack that was there before.

Also, clean up the isonum_* definitions so that the #ifdefs aren't
impossibly spread apart.  (Now the #ifdefs are _in_ the functions.  This
leads to #ifdefs that are only a few lines long, rather than a few _pages_
long, as well as a reduction of duplication of function headers, etc.)
Note that isonum_7{21,22,31,32} are currently missing.
1997-01-24 00:26:31 +00:00
cgd c6b52a9608 split iso.h into two parts: iso.h (which now contains _only_ definitions
about ISO9660 file system structure), and cd9660_extern.h (which now
contains the definitions and data structures used by the kernel).
There's lots of other stuff scattered around this code that should go
into cd9660_extern.h, but doesn't need to right now.  This changed patterned
on ffs, which has 'fs.h' which describes the FS structure, and ffs_extern.h
for kernel-internals gunk.  Now libsa can include iso.h without the nasty
hack that was there before.
1997-01-24 00:24:53 +00:00
cgd 90688fce27 Change the second and third args to struct vfsops' (*vfs_mount)() to
'const char *', and 'void *', respectively.  The second arg is taken directly
from user arguments, and is const there, so must be const in the prototypes
and functions.  The third arg is also taken directly from user arguments.
It doesn't have to be changed, but since it's cleaner to keep the type
the same as the user arg's type, and I'm already making the 'const char *'
change...
1996-12-22 10:10:12 +00:00
cgd ce53653783 make the namei struct members ni_dirp and ni_next, and the componentname
struct member cn_nameptr 'const', since they should never be used to
modify the path name.  (Only the pathname buffer, cn_pnbuf, should be
modified.)  Propagate the const poisoning to code that uses the namei
and componentname structs.
1996-10-25 23:13:58 +00:00
christos e44c1d1f33 backout previous kprintf changes 1996-10-13 02:28:58 +00:00
christos c514106b9d printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:39:39 +00:00
thorpej 9a4909e2e2 Prototype cd9660_setattr(). 1996-10-04 03:27:49 +00:00
thorpej f3a02a3e45 Prototype the inline functions before declaring them. Compiles again
on the SPARC.
1996-10-04 03:23:36 +00:00
ws f41078daf3 Extern inline functions to better support cross-compilation 1996-09-30 15:53:13 +00:00
ws 7299885617 Allow changing the length of devices and fifos on the readonly 9660 fs. 1996-09-30 15:52:00 +00:00
ws f3c7374317 Formatting police 1996-09-30 15:50:19 +00:00
mycroft 2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
mycroft c52352c819 Add a set of generic file system operations that most file systems use.
Also, fix some time stamp bogosities.
1996-09-01 23:47:48 +00:00
ws 17d0816194 Allow newer IEEE version of Rock Ridge CDs
Note that this should really handle the multiple ER/ES entries, sparse files
and probably the file serial number field in PX entries.
1996-07-12 13:15:29 +00:00
ws abee4409dd Correct evaluation of assoc introduced on ansification
Correct some function parameters (in #ifdef'ed out code)
Correct references to ufs in messages and comments
some formatting changes
1996-03-16 20:25:40 +00:00
scottr 6efb550cb2 DIRSIZ -> DIRENT_SIZE, to avoid a conflict with the ufs and <dir.h>
(compat) DIRSIZ macros.  Also closes PR 2184.
1996-03-08 18:13:05 +00:00
gwr 27db0deb1b Use <sys/dirent.h> instead of <sys/dir.h> which is depreciated. 1996-02-29 20:36:39 +00:00
christos 2f1e5a946a Another typo. 1996-02-10 00:33:53 +00:00
christos 245d8c1eb2 isofs prototypes 1996-02-09 21:31:50 +00:00
mycroft 53fccab940 Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
  cleanup.
* Require the file system to decide whether or not linking and unlinking of
  directories is allowed, and disable it for all current file systems.
1996-02-09 14:45:36 +00:00
jtc e19bfae4f9 Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:18:04 +00:00
pk fe934606c7 NBPG may not be computable by the preprocessor. Make "do clustered io"
a run-time decision. Note: the compiler can optimize it away.
1995-12-01 00:47:33 +00:00
cgd 7a34e263d7 "goto start" after sleeping for locked iso_node in cd9660_lock, like
in ufs_lock.
1995-11-08 22:26:24 +00:00
cgd e9d17d38b5 avoid unnecessary aging of buffers. This used to make sense, when buffer
caches were much smaller, but makes little sense now, and will become more
useless as RAM (and buffer cache) sizes grow.  Suggested by Bob Baron.
1995-07-24 21:19:27 +00:00
cgd db0f3de337 replace an incorrect remque. 1995-06-28 05:10:45 +00:00
cgd 8f62c773e8 don't assume the f_fsnamelen is nul-truncated or longer than MFSNAMELEN 1995-06-18 14:45:14 +00:00
mycroft 2f805fa51b copy*str() should use size_t. 1995-03-09 12:05:21 +00:00
cgd aac6b08302 use u_long for copyin* 1995-03-08 01:33:20 +00:00
mycroft 4c34be6b52 Clean up deleted files. 1995-03-01 00:00:00 +00:00
mycroft f8bce247fa Fix typo in previous. 1995-01-18 09:26:18 +00:00
mycroft ac152cdeb3 Clean up the code to frob mnt_stat a bit. Eliminate im_fsmnt. 1995-01-18 09:23:18 +00:00
mycroft 6afe4059be Turn mountlist into a CIRCLEQ, and handle setting and checking of MNT_ROOTFS
differently.
1995-01-18 06:14:00 +00:00
mycroft 609063ce2b Format police. 1994-12-27 19:05:12 +00:00
ws 2f0fb8ee09 Implement and use a common access checking routine 1994-12-24 16:44:12 +00:00
cgd 55300e7b13 various cleanups suggested by James Jegers, some then fixed up by me. 1994-12-24 15:30:03 +00:00
mycroft b4aa6d3a28 Call foo_statfs() from a common place when mounting. 1994-12-15 19:46:08 +00:00
mycroft 7beacb354f This *doesn't* need dkbad.h. 1994-12-14 13:42:18 +00:00
mycroft 8c03c53858 Sync with CSRG. 1994-12-13 22:33:10 +00:00
mycroft ab509af8af Patches from Kirk Mckusick to fix the fifo and spec op tables, and speed up
symlink handling a little.
1994-12-06 06:56:40 +00:00
cgd 6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
cgd be8c7b9d80 light clean; make sure headers are properly included, types are OK, etc. 1994-10-29 07:58:24 +00:00
cgd 6b86130410 update for new syscall args description mechanism 1994-10-20 04:22:35 +00:00
mycroft 3d13acbea0 Make the tstamp functions take `u_char *', not `char *'. 1994-09-22 02:47:31 +00:00
mycroft ef22ebf733 Change timevals to timespecs. 1994-09-22 02:44:35 +00:00
mycroft 9283f4936d Change the remaining 731's to 733's. Redo the conversion functions to
allow unaligned access.  Don't use 0-length arrays.
1994-09-19 09:09:46 +00:00
mycroft c0cc31ee6f For symlinks, try actually reading the link to determine its size. 1994-08-19 11:36:56 +00:00
mycroft b6e5975c12 Fix off-by-one error translating names of associated files. 1994-08-19 11:31:50 +00:00
mycroft 0372e53d79 Mild nits. 1994-08-03 06:03:12 +00:00
mycroft 92183975ef Make sure we don't release the buffer too early. 1994-07-22 23:17:59 +00:00
mycroft dd628fd6d9 Fix potential infinite loop on empty directory blocks (not that this should
ever happen).
1994-07-20 06:09:38 +00:00
mycroft 988d22662a Implement pathconf(2). 1994-07-19 23:33:59 +00:00
mycroft 8e8b6c5b10 Not that it matters, but don't assume we're two's-complement. 1994-07-19 15:27:40 +00:00
mycroft fa062570f9 Fix two more typos (identical). 1994-07-19 15:14:07 +00:00
mycroft ffbc3c6a24 Fix typo. 1994-07-19 15:10:50 +00:00
mycroft f8fae0f555 More redux. 1994-07-19 15:07:36 +00:00
mycroft 1656a89476 Clean up a bit:
Implement cd9660_blkatoff() and use it.
Reduce lots of multiplies and divides to shifts.
Make some macros look more like UFS.
Make isodirino() return the inumber rather than poke it into the abyss.
1994-07-19 14:14:08 +00:00
mycroft e5fad6ece4 Remove things which are already done. 1994-07-19 11:34:48 +00:00
mycroft 0dd02c82cf Fix inode number generation in readdir(). 1994-07-18 13:13:46 +00:00
mycroft 258fcca13b For VOP_VGET(), pretend that relocated directories don't exist, for now. 1994-07-18 08:07:50 +00:00
mycroft da89cc4547 Remember to clear d_type. 1994-07-14 01:43:42 +00:00
mycroft 0c2e843ee1 Implement cd9660_vget(). Clean up a bit. 1994-07-13 22:30:07 +00:00
mycroft af65c82115 Style nits. 1994-07-03 09:51:58 +00:00
deraadt 0cb4bed2dd knf 1994-06-30 07:25:23 +00:00