AquilaOS documentation
How it works, and its code
Toggle main menu visibility
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
16
int
posix_file_trunc
(
struct
file
*
file
,
off_t
len)
17
{
18
return
vfs_trunc
(
file
->vnode, len);
19
}
system.h
posix_file_trunc
int posix_file_trunc(struct file *file, off_t len)
Truncates (or extends) an open file to a new length.
Definition
trunc.c:16
posix.h
file
An open file (POSIX's "open file description", fs/file.c).
Definition
vfs.h:157
vfs_trunc
int vfs_trunc(struct vnode *vnode, off_t len)
Changes a file's length, through its filesystem.
Definition
trunc.c:19
off_t
long int off_t
Definition
types.h:10
vfs.h
kernel
fs
posix
trunc.c
Generated by
1.18.0