AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
open.c File Reference

The generic open operation for files that are vnodes. More...

#include <fs/posix.h>
#include <aquila/fcntl.h>
#include <fs/stat.h>
#include <sys/sched.h>

Go to the source code of this file.

Functions

int posix_file_open (struct file *file)
 Finishes opening a file: with O_TRUNC, a regular file is truncated to 0 bytes.

Detailed Description

The generic open operation for files that are vnodes.

Definition in file open.c.

Function Documentation

◆ posix_file_open()

int posix_file_open ( struct file * file)

Finishes opening a file: with O_TRUNC, a regular file is truncated to 0 bytes.

Parameters
filethe file being opened
Returns
0, or a negative errno if the truncation failed

Definition at line 17 of file open.c.

References file::flags, posix_file_open(), and vfs_file_trunc().

Referenced by kmsg_file_open(), posix_file_open(), ps2mouse_file_open(), and pts_open().