VFS layer API declarations.
- Author
- Joakim NohlgÄrd joaki.nosp@m.m.no.nosp@m.hlgar.nosp@m.d@ei.nosp@m.stec..nosp@m.se
Definition in file vfs.h.
|
|
#define | MAX7(a, b, c, d, e, f, g) MAX(MAX(MAX(MAX(MAX((a), (b)), MAX((c), (d))), (e)), (f)), (g)) |
| | MAX7 Function to get the largest of 7 values.
|
| |
|
#define | VFS_MAX_OPEN_FILES (16) |
| | Maximum number of simultaneous open files.
|
| |
| #define | VFS_DIR_BUFFER_SIZE |
| | Size of buffer space in vfs_DIR. More...
|
| |
| #define | VFS_FILE_BUFFER_SIZE |
| | Size of buffer space in vfs_file_t. More...
|
| |
| #define | VFS_NAME_MAX (31) |
| | Maximum length of the name in a vfs_dirent_t (not including terminating null) More...
|
| |
|
#define | VFS_ANY_FD (-1) |
| | Used with vfs_bind to bind to any available fd number.
|
| |
| #define | VFS_MTD(mtd) { .dev = &mtd.base } |
| | Helper macro for VFS_AUTO_MOUNT. More...
|
| |
| #define | VFS_AUTO_MOUNT(type, mtd, path, idx) |
| | Define an automatic mountpoint. More...
|
| |
|
#define | VFS_FS_FLAG_WANT_ABS_PATH (1 << 0) |
| | File system always wants the full VFS path.
|
| |
|
| void | vfs_bind_stdio (void) |
| | Allocate and bind file descriptors for STDIN, STDERR, and STDOUT. More...
|
| |
| int | vfs_close (int fd) |
| | Close an open file. More...
|
| |
| int | vfs_fcntl (int fd, int cmd, int arg) |
| | Query/set options on an open file. More...
|
| |
| int | vfs_fstat (int fd, struct stat *buf) |
| | Get status of an open file. More...
|
| |
| int | vfs_fstatvfs (int fd, struct statvfs *buf) |
| | Get file system status of the file system containing an open file. More...
|
| |
| int | vfs_dstatvfs (vfs_DIR *dirp, struct statvfs *buf) |
| | Get file system status of the file system containing an open directory. More...
|
| |
| off_t | vfs_lseek (int fd, off_t off, int whence) |
| | Seek to position in file. More...
|
| |
| int | vfs_open (const char *name, int flags, mode_t mode) |
| | Open a file. More...
|
| |
| ssize_t | vfs_read (int fd, void *dest, size_t count) |
| | Read bytes from an open file. More...
|
| |
| ssize_t | vfs_readline (int fd, char *dest, size_t count) |
| | Read a line from an open text file. More...
|
| |
| ssize_t | vfs_write (int fd, const void *src, size_t count) |
| | Write bytes to an open file. More...
|
| |
| ssize_t | vfs_write_iol (int fd, const iolist_t *iolist) |
| | Write bytes from an iolist to an open file. More...
|
| |
| int | vfs_fsync (int fd) |
| | Synchronize a file on storage Any pending writes are written out to storage. More...
|
| |
| int | vfs_opendir (vfs_DIR *dirp, const char *dirname) |
| | Open a directory for reading with readdir. More...
|
| |
| int | vfs_readdir (vfs_DIR *dirp, vfs_dirent_t *entry) |
| | Read a single entry from the open directory dirp and advance the read position by one. More...
|
| |
| int | vfs_closedir (vfs_DIR *dirp) |
| | Close an open directory. More...
|
| |
| int | vfs_format (vfs_mount_t *mountp) |
| | Format a file system. More...
|
| |
| int | vfs_format_by_path (const char *path) |
| | Format a file system. More...
|
| |
| int | vfs_mount (vfs_mount_t *mountp) |
| | Mount a file system. More...
|
| |
| int | vfs_mount_by_path (const char *path) |
| | Mount a file system with a pre-configured mount path. More...
|
| |
| int | vfs_unmount_by_path (const char *path, bool force) |
| | Unmount a file system with a pre-configured mount path. More...
|
| |
| int | vfs_rename (const char *from_path, const char *to_path) |
| | Rename a file. More...
|
| |
| int | vfs_umount (vfs_mount_t *mountp, bool force) |
| | Unmount a mounted file system. More...
|
| |
| int | vfs_unlink (const char *name) |
| | Unlink (delete) a file from a mounted file system. More...
|
| |
| int | vfs_mkdir (const char *name, mode_t mode) |
| | Create a directory on the file system. More...
|
| |
| int | vfs_rmdir (const char *name) |
| | Remove a directory from the file system. More...
|
| |
| int | vfs_stat (const char *restrict path, struct stat *restrict buf) |
| | Get file status. More...
|
| |
| int | vfs_statvfs (const char *restrict path, struct statvfs *restrict buf) |
| | Get file system status. More...
|
| |
| int | vfs_bind (int fd, int flags, const vfs_file_ops_t *f_op, void *private_data) |
| | Allocate a new file descriptor and give it file operations. More...
|
| |
| int | vfs_normalize_path (char *buf, const char *path, size_t buflen) |
| | Normalize a path. More...
|
| |
| bool | vfs_iterate_mount_dirs (vfs_DIR *dir) |
| | Iterate through all mounted file systems by their root directories. More...
|
| |
| const vfs_file_t * | vfs_file_get (int fd) |
| | Get information about the file for internal purposes. More...
|
| |
| int | vfs_sysop_stat_from_fstat (vfs_mount_t *mountp, const char *restrict path, struct stat *restrict buf) |
| | Implementation of stat using fstat More...
|
| |