Date: Mon, 7 Jan 2008 20:05:19 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: 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 ... Message-ID: <200801072005.m07K5JcY015771@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801072005.m07K5JcY015771>