|
AquilaOS documentation
How it works, and its code
|
Truncating a vnode: changing a file's length. More...
Go to the source code of this file.
Functions | |
| int | vfs_trunc (struct vnode *vnode, off_t len) |
| Changes a file's length, through its filesystem. | |
Truncating a vnode: changing a file's length.
Definition in file trunc.c.
Changes a file's length, through its filesystem.
The file's pages in the page cache between the old end and the new one are refreshed.
| vnode | the file |
| len | the new length, in bytes |
Definition at line 19 of file trunc.c.
References vnode::fs, ISDEV, LOG_DEBUG, MAX, MIN, vnode::size, vops::trunc, vfs_trunc(), vnode_pages_update(), and fs::vops.
Referenced by posix_file_trunc(), and vfs_trunc().