|
CardSight 0.1.0
C API reference for the CardSight firmware and application
|
Operations a file system type provides to the VFS. More...
#include <vfs.h>
Data Fields | |
| const char * | name |
| uint32_t | flags |
| int(* | mount )(struct block_device *bdev, uint32_t flags, void **priv) |
| int(* | umount )(void *priv) |
| int(* | sync )(void *priv) |
| int(* | format )(struct block_device *bdev, const char *label, uint32_t arg) |
| int(* | open )(void *priv, const char *path, uint32_t flags, void **file) |
| int(* | read )(void *file, void *buffer, size_t length) |
| int(* | write )(void *file, const void *buffer, size_t length) |
| int64_t(* | seek )(void *file, int64_t offset, int whence) |
| int(* | truncate )(void *file, uint64_t size) |
| int(* | flush )(void *file) |
| int(* | close )(void *file) |
| int(* | fstat )(void *file, struct vfs_stat *st) |
| int(* | stat )(void *priv, const char *path, struct vfs_stat *st) |
| int(* | mkdir )(void *priv, const char *path) |
| int(* | unlink )(void *priv, const char *path) |
| int(* | rmdir )(void *priv, const char *path) |
| int(* | rename )(void *priv, const char *from, const char *to) |
| int(* | opendir )(void *priv, const char *path, void **dir) |
| int(* | readdir )(void *dir, struct vfs_dirent *entry) |
| int(* | closedir )(void *dir) |
| int(* | statfs )(void *priv, uint64_t *total, uint64_t *free_bytes) |
| int(* | volume_info )(void *priv, struct vfs_volume_info *info) |
Operations a file system type provides to the VFS.
The mount hook receives a private pointer that every later hook gets back. Hooks that a type does not implement are NULL, and calls that need them fail with -ENOTSUP.
| int(* vfs_fs::close) (void *file) |
Close a file.
| int(* vfs_fs::closedir) (void *dir) |
Close a directory.
| uint32_t vfs_fs::flags |
VFS_FS_* flags.
| int(* vfs_fs::flush) (void *file) |
Flush a file.
| int(* vfs_fs::format) (struct block_device *bdev, const char *label, uint32_t arg) |
Format.
| int(* vfs_fs::fstat) (void *file, struct vfs_stat *st) |
Stat an open file.
| int(* vfs_fs::mkdir) (void *priv, const char *path) |
Create a directory.
| int(* vfs_fs::mount) (struct block_device *bdev, uint32_t flags, void **priv) |
Mount a volume.
| const char* vfs_fs::name |
Type name, as used on the mount command line.
| int(* vfs_fs::open) (void *priv, const char *path, uint32_t flags, void **file) |
Open a file.
| int(* vfs_fs::opendir) (void *priv, const char *path, void **dir) |
Open a directory.
| int(* vfs_fs::read) (void *file, void *buffer, size_t length) |
Read a file.
| int(* vfs_fs::readdir) (void *dir, struct vfs_dirent *entry) |
Read a directory entry.
| int(* vfs_fs::rename) (void *priv, const char *from, const char *to) |
Rename an entry.
| int(* vfs_fs::rmdir) (void *priv, const char *path) |
Remove a directory.
| int64_t(* vfs_fs::seek) (void *file, int64_t offset, int whence) |
Move a file position.
| int(* vfs_fs::stat) (void *priv, const char *path, struct vfs_stat *st) |
Stat a path.
| int(* vfs_fs::statfs) (void *priv, uint64_t *total, uint64_t *free_bytes) |
Volume capacity.
| int(* vfs_fs::sync) (void *priv) |
Flush a mounted volume.
| int(* vfs_fs::truncate) (void *file, uint64_t size) |
Resize a file.
| int(* vfs_fs::umount) (void *priv) |
Unmount a volume.
| int(* vfs_fs::unlink) (void *priv, const char *path) |
Remove a file.
| int(* vfs_fs::volume_info) (void *priv, struct vfs_volume_info *info) |
Volume description.
| int(* vfs_fs::write) (void *file, const void *buffer, size_t length) |
Write a file.