RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "../../libc/compilers/common/include/dirent.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/time.h>
#include <sys/errno.h>
#include <rtatomic.h>
#include <rtdevice.h>
结构体 | |
struct | dfs_fdtable |
宏定义 | |
#define | ATTR_MODE_SET (1 << 6) |
#define | ATTR_ATIME_SET (1 << 7) |
#define | ATTR_MTIME_SET (1 << 8) |
#define | ATTR_UID_SET (1 << 9) |
#define | ATTR_GID_SET (1 << 10) |
#define | AT_SYMLINK_NOFOLLOW 0x100 |
#define | UTIME_NOW 0x3fffffff |
#define | UTIME_OMIT 0x3ffffffe |
#define | DFS_FD_MAX 16 |
#define | DFS_STDIO_OFFSET 3 |
#define | DFS_PATH_MAX 4096 |
#define | SECTOR_SIZE 512 |
#define | DFS_FS_FLAG_DEFAULT 0x00 /* default flag */ |
#define | DFS_FS_FLAG_FULLPATH 0x01 /* set full path to underlaying file system */ |
#define | DFS_F_FREAD 0x01 |
#define | DFS_F_FWRITE 0x02 |
函数 | |
rt_inline int | dfs_fflags (int oflags) |
rt_inline int | dfs_oflags (int fflags) |
int | dfs_init (void) |
char * | dfs_normalize_path (const char *directory, const char *filename) |
const char * | dfs_subdir (const char *directory, const char *filename) |
rt_err_t | dfs_lock (void) |
void | dfs_unlock (void) |
rt_err_t | dfs_file_lock (void) |
void | dfs_file_unlock (void) |
int | dfs_fdtable_dup (struct dfs_fdtable *fdt_dst, struct dfs_fdtable *fdt_src, int fd_src) |
int | dfs_fdtable_drop_fd (struct dfs_fdtable *fdtab, int fd) |
#define DFS_FS_FLAG_FULLPATH 0x01 /* set full path to underlaying file system */ |
rt_inline int dfs_fflags | ( | int | oflags | ) |
rt_inline int dfs_oflags | ( | int | fflags | ) |
引用了 DFS_F_FREAD , 以及 DFS_F_FWRITE.
rt_err_t dfs_lock | ( | void | ) |
this function will lock device file system.
引用了 rt_mutex_take() , 以及 RT_WAITING_FOREVER.
void dfs_unlock | ( | void | ) |
this function will lock device file system.
引用了 rt_mutex_release().