AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
fops Struct Reference

An open file's operations. More...

#include <vfs.h>

Data Fields

int(*) open (struct file *file)
ssize_t(*) read (struct file *file, struct iobuf *io)
ssize_t(*) write (struct file *file, struct iobuf *io)
ssize_t(*) readdir (struct file *file, struct dirent *dirent)
off_t(*) lseek (struct file *file, off_t offset, int whence)
int(*) close (struct file *file)
int(*) ioctl (struct file *file, int request, void *argp)
int(*) trunc (struct file *file, off_t len)
int(*) can_read (struct file *file, size_t size)
int(*) can_write (struct file *file, size_t size)
int(*) eof (struct file *)
uint64_t(*) read_timeout (struct file *)

Detailed Description

An open file's operations.

read and write move the bytes through an iobuf (fs/iobuf.h), whose resid is how many are asked for.

Definition at line 28 of file vfs.h.

Field Documentation

◆ can_read

int(*) fops::can_read(struct file *file, size_t size)

Definition at line 39 of file vfs.h.

Referenced by kdev_file_can_read().

◆ can_write

int(*) fops::can_write(struct file *file, size_t size)

Definition at line 40 of file vfs.h.

Referenced by kdev_file_can_write().

◆ close

int(*) fops::close(struct file *file)

Definition at line 34 of file vfs.h.

Referenced by kdev_file_close().

◆ eof

int(*) fops::eof(struct file *)

Definition at line 41 of file vfs.h.

Referenced by kdev_file_eof().

◆ ioctl

int(*) fops::ioctl(struct file *file, int request, void *argp)

Definition at line 35 of file vfs.h.

Referenced by kdev_file_ioctl().

◆ lseek

off_t(*) fops::lseek(struct file *file, off_t offset, int whence)

Definition at line 33 of file vfs.h.

Referenced by kdev_file_lseek().

◆ open

int(*) fops::open(struct file *file)

Definition at line 29 of file vfs.h.

Referenced by kdev_file_open().

◆ read

ssize_t(*) fops::read(struct file *file, struct iobuf *io)

Definition at line 30 of file vfs.h.

Referenced by kdev_file_read().

◆ read_timeout

uint64_t(*) fops::read_timeout(struct file *)

Definition at line 45 of file vfs.h.

Referenced by posix_file_read().

◆ readdir

ssize_t(*) fops::readdir(struct file *file, struct dirent *dirent)

Definition at line 32 of file vfs.h.

◆ trunc

int(*) fops::trunc(struct file *file, off_t len)

Definition at line 36 of file vfs.h.

◆ write

ssize_t(*) fops::write(struct file *file, struct iobuf *io)

Definition at line 31 of file vfs.h.

Referenced by kdev_file_write().


The documentation for this struct was generated from the following file:
  • kernel/include/fs/vfs.h