cvs commit: src/sys/dev/streams streams.c src/sys/fs/devfs
devfs_vnops.c src/sys/fs/fifofs fifo_vnops.c src/sys/kern
kern_descrip.c kern_event.c sys_generic.c sys_pipe.c sys_socket.c
uipc_mqueue.c vfs_syscalls.c vfs_vnops.c src/sys/opencrypto ...
John Baldwin
jhb at FreeBSD.org
Mon Jan 7 12:05:20 PST 2008
jhb 2008-01-07 20:05:19 UTC
FreeBSD src repository
Modified files:
sys/dev/streams streams.c
sys/fs/devfs devfs_vnops.c
sys/fs/fifofs fifo_vnops.c
sys/kern kern_descrip.c kern_event.c sys_generic.c
sys_pipe.c sys_socket.c uipc_mqueue.c
vfs_syscalls.c vfs_vnops.c
sys/opencrypto cryptodev.c
sys/sys file.h syscallsubr.h
Log:
Make ftruncate a 'struct file' operation rather than a vnode operation.
This makes it possible to support ftruncate() on non-vnode file types in
the future.
- 'struct fileops' grows a 'fo_truncate' method to handle an ftruncate() on
a given file descriptor.
- ftruncate() moves to kern/sys_generic.c and now just fetches a file
object and invokes fo_truncate().
- The vnode-specific portions of ftruncate() move to vn_truncate() in
vfs_vnops.c which implements fo_truncate() for vnode file types.
- Non-vnode file types return EINVAL in their fo_truncate() method.
Submitted by: rwatson
Revision Changes Path
1.58 +1 -0 src/sys/dev/streams/streams.c
1.152 +8 -0 src/sys/fs/devfs/devfs_vnops.c
1.140 +9 -0 src/sys/fs/fifofs/fifo_vnops.c
1.317 +8 -0 src/sys/kern/kern_descrip.c
1.116 +11 -0 src/sys/kern/kern_event.c
1.162 +66 -1 src/sys/kern/sys_generic.c
1.196 +14 -0 src/sys/kern/sys_pipe.c
1.75 +9 -0 src/sys/kern/sys_socket.c
1.27 +9 -0 src/sys/kern/uipc_mqueue.c
1.446 +0 -90 src/sys/kern/vfs_syscalls.c
1.256 +49 -0 src/sys/kern/vfs_vnops.c
1.37 +14 -0 src/sys/opencrypto/cryptodev.c
1.75 +16 -0 src/sys/sys/file.h
1.47 +1 -0 src/sys/sys/syscallsubr.h
More information about the cvs-src
mailing list