AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
trunc.c
Go to the documentation of this file.
1
4
5#include <core/system.h>
6#include <fs/vfs.h>
7#include <fs/posix.h>
8
17{
18 return vfs_trunc(file->vnode, len);
19}
int posix_file_trunc(struct file *file, off_t len)
Truncates (or extends) an open file to a new length.
Definition trunc.c:16
An open file (POSIX's "open file description", fs/file.c).
Definition vfs.h:157
int vfs_trunc(struct vnode *vnode, off_t len)
Changes a file's length, through its filesystem.
Definition trunc.c:19
long int off_t
Definition types.h:10