Operations on mounted file systems. More...
Operations on mounted file systems.
Similar, but not equal, to struct super_operations in Linux
#include <vfs.h>
Data Fields | |
int(* | format )(vfs_mount_t *mountp) |
Format the file system on the given mount point. More... | |
int(* | mount )(vfs_mount_t *mountp) |
Perform any extra processing needed after mounting a file system. More... | |
int(* | umount )(vfs_mount_t *mountp) |
Perform the necessary clean up for unmounting a file system. More... | |
int(* | rename )(vfs_mount_t *mountp, const char *from_path, const char *to_path) |
Rename a file. More... | |
int(* | unlink )(vfs_mount_t *mountp, const char *name) |
Unlink (delete) a file from the file system. More... | |
int(* | mkdir )(vfs_mount_t *mountp, const char *name, mode_t mode) |
Create a directory on the file system. More... | |
int(* | rmdir )(vfs_mount_t *mountp, const char *name) |
Remove a directory from the file system. More... | |
int(* | stat )(vfs_mount_t *mountp, const char *restrict path, struct stat *restrict buf) |
Get file status. More... | |
int(* | statvfs )(vfs_mount_t *mountp, const char *restrict path, struct statvfs *restrict buf) |
Get file system status. More... | |
int(* | fstatvfs )(vfs_mount_t *mountp, vfs_file_t *filp, struct statvfs *buf) |
Get file system status of an open file. More... | |
int(* vfs_file_system_ops::format) (vfs_mount_t *mountp) |
int(* vfs_file_system_ops::fstatvfs) (vfs_mount_t *mountp, vfs_file_t *filp, struct statvfs *buf) |
Get file system status of an open file.
path
is only passed for consistency against the POSIX statvfs function. vfs_statvfs
calls this function only when it has determined that path
belongs to this file system. path
is a file system relative path and does not necessarily name an existing file.
[in] | mountp | file system mount to operate on |
[in] | filp | pointer to an open file on the file system being queried |
[out] | buf | pointer to statvfs struct to fill |
int(* vfs_file_system_ops::mkdir) (vfs_mount_t *mountp, const char *name, mode_t mode) |
int(* vfs_file_system_ops::mount) (vfs_mount_t *mountp) |
Perform any extra processing needed after mounting a file system.
If this call returns an error, the whole vfs_mount call will signal a failure.
All fields of mountp
will be initialized by vfs_mount beforehand, private_data
will be initialized to NULL.
[in] | mountp | file system mount being mounted |
int(* vfs_file_system_ops::rename) (vfs_mount_t *mountp, const char *from_path, const char *to_path) |
Rename a file.
The file from_path
will be renamed to to_path
[in] | mountp | file system mount to operate on |
[in] | from_path | absolute path to existing file |
[in] | to_path | absolute path to destination |
int(* vfs_file_system_ops::rmdir) (vfs_mount_t *mountp, const char *name) |
int(* vfs_file_system_ops::stat) (vfs_mount_t *mountp, const char *restrict path, struct stat *restrict buf) |
int(* vfs_file_system_ops::statvfs) (vfs_mount_t *mountp, const char *restrict path, struct statvfs *restrict buf) |
Get file system status.
path
is only passed for consistency against the POSIX statvfs function. vfs_statvfs
calls this function only when it has determined that path
belongs to this file system. path
is a file system relative path and does not necessarily name an existing file.
[in] | mountp | file system mount to operate on |
[in] | path | path to a file on the file system being queried |
[out] | buf | pointer to statvfs struct to fill |
int(* vfs_file_system_ops::umount) (vfs_mount_t *mountp) |
int(* vfs_file_system_ops::unlink) (vfs_mount_t *mountp, const char *name) |