My Kernel v0.1.0
vfs.h File Reference
#include <kernel/error.h>
#include <kernel/file.h>
#include <kernel/types.h>
#include <uapi/fcntl.h>
#include <lib/path.h>
#include <libalgo/linked_list.h>
#include <utils/compiler.h>
#include <utils/stringify.h>
#include <sys/stat.h>
Include dependency graph for vfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vfs_operations
 Vector Table for operations on a filesystems. More...
 
struct  vfs
 represents a single virtual filesystem More...
 
struct  vnode_operations
 Vector table for operations performed on a single virtual node. More...
 
struct  vnode
 represents a single virtual node More...
 
struct  vfs_fs
 Represents a file system format. More...
 

Macros

#define DECLARE_FILESYSTEM(fs_name, fs_new)
 Declare a new available filesystem. More...
 

Enumerations

enum  vnode_type {
  VNODE_FIFO = S_IFIFO , VNODE_CHARDEVICE = S_IFCHR , VNODE_DIRECTORY = S_IFDIR , VNODE_BLOCKDEVICE = S_IFBLK ,
  VNODE_FILE = S_IFREG , VNODE_SYMLINK = S_IFLNK , VNODE_SOCKET = S_IFSOCK
}
 The different existing types of vnodes. More...
 

Functions

error_t vfs_mount (const char *path, const char *fs_type, struct block_device *)
 Mount a filesystem of the given type at a given path. More...
 
error_t vfs_mount_root (const char *fs_type, struct block_device *)
 Mount a filesystem at the root of the VFS. More...
 
error_t vfs_unmount (const char *path)
 Unmount the filesystem present at the given path. More...
 
vnode_tvfs_find_by_path (const char *path)
 Retreive the vnode corresponding to a path. More...
 
vnode_tvfs_create (const char *path, vnode_type type)
 Create a new file at the given path. More...
 
error_t vfs_remove (const char *path)
 Remove the file located at the given path. More...
 
struct filevfs_open (const char *path, int oflags)
 Open the file located at the given path. More...
 
vnode_tvfs_vnode_acquire (vnode_t *, bool *)
 Increment the refcount of a vnode. More...
 
vnode_tvfs_vnode_release (vnode_t *)
 Decrease the refcount of a vnode. More...
 
static bool vfs_exist (const char *path)