MOS Source Code
Loading...
Searching...
No Matches
inode_ops_t Struct Reference

#include <vfs_types.h>

Public Attributes

bool(* hardlink )(dentry_t *old_dentry, inode_t *dir, dentry_t *new_dentry)
 create a hard link
 
void(* iterate_dir )(dentry_t *dentry, vfs_listdir_state_t *iterator_state, dentry_iterator_op op)
 iterate over the contents of a directory
 
bool(* lookup )(inode_t *dir, dentry_t *dentry)
 lookup a file in a directory, if it's unset for a directory, the VFS will use the default lookup
 
bool(* mkdir )(inode_t *dir, dentry_t *dentry, file_perm_t perm)
 create a new directory
 
bool(* mknode )(inode_t *dir, dentry_t *dentry, file_type_t type, file_perm_t perm, dev_t dev)
 create a new device file
 
bool(* newfile )(inode_t *dir, dentry_t *dentry, file_type_t type, file_perm_t perm)
 create a new file
 
size_t(* readlink )(dentry_t *dentry, char *buffer, size_t buflen)
 read the contents of a symbolic link
 
bool(* rename )(inode_t *old_dir, dentry_t *old_dentry, inode_t *new_dir, dentry_t *new_dentry)
 rename a file
 
bool(* rmdir )(inode_t *dir, dentry_t *dentry)
 remove a directory
 
bool(* symlink )(inode_t *dir, dentry_t *dentry, const char *symname)
 create a symbolic link
 
bool(* unlink )(inode_t *dir, dentry_t *dentry)
 remove a file name, this is called after nlinks is decremented
 

Detailed Description

Definition at line 62 of file vfs_types.h.

Member Data Documentation

◆ hardlink

bool(* hardlink) (dentry_t *old_dentry, inode_t *dir, dentry_t *new_dentry)

create a hard link

Definition at line 65 of file vfs_types.h.

◆ iterate_dir

void(* iterate_dir) (dentry_t *dentry, vfs_listdir_state_t *iterator_state, dentry_iterator_op op)

iterate over the contents of a directory

Definition at line 67 of file vfs_types.h.

Referenced by vfs_populate_listdir_buf().

◆ lookup

bool(* lookup) (inode_t *dir, dentry_t *dentry)

lookup a file in a directory, if it's unset for a directory, the VFS will use the default lookup

Definition at line 69 of file vfs_types.h.

Referenced by dentry_lookup_child().

◆ mkdir

bool(* mkdir) (inode_t *dir, dentry_t *dentry, file_perm_t perm)

create a new directory

Definition at line 71 of file vfs_types.h.

Referenced by vfs_mkdir().

◆ mknode

bool(* mknode) (inode_t *dir, dentry_t *dentry, file_type_t type, file_perm_t perm, dev_t dev)

create a new device file

Definition at line 73 of file vfs_types.h.

◆ newfile

bool(* newfile) (inode_t *dir, dentry_t *dentry, file_type_t type, file_perm_t perm)

create a new file

Definition at line 75 of file vfs_types.h.

Referenced by memfd_create(), and vfs_do_open().

◆ readlink

size_t(* readlink) (dentry_t *dentry, char *buffer, size_t buflen)

read the contents of a symbolic link

Definition at line 77 of file vfs_types.h.

Referenced by dentry_resolve_follow_symlink(), and vfs_readlinkat().

◆ rename

bool(* rename) (inode_t *old_dir, dentry_t *old_dentry, inode_t *new_dir, dentry_t *new_dentry)

rename a file

Definition at line 79 of file vfs_types.h.

◆ rmdir

bool(* rmdir) (inode_t *dir, dentry_t *dentry)

remove a directory

Definition at line 81 of file vfs_types.h.

Referenced by vfs_rmdir().

◆ symlink

bool(* symlink) (inode_t *dir, dentry_t *dentry, const char *symname)

create a symbolic link

Definition at line 83 of file vfs_types.h.

Referenced by vfs_symlink().

◆ unlink

bool(* unlink) (inode_t *dir, dentry_t *dentry)

remove a file name, this is called after nlinks is decremented

Definition at line 85 of file vfs_types.h.

Referenced by inode_unlink(), and vfs_unlinkat().


The documentation for this struct was generated from the following file: