mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 03:09:16 +08:00
sync smart & dfs (#8672)
Signed-off-by: xqyjlj <xqyjlj@126.com> Signed-off-by: Shell <smokewood@qq.com> Co-authored-by: xqyjlj <xqyjlj@126.com>
This commit is contained in:
@@ -25,6 +25,10 @@
|
||||
#include <rtatomic.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#ifndef ATTR_MODE_SET
|
||||
#define ATTR_MODE_SET (1 << 6)
|
||||
#endif
|
||||
|
||||
#ifndef ATTR_ATIME_SET
|
||||
#define ATTR_ATIME_SET (1 << 7)
|
||||
#endif
|
||||
@@ -33,6 +37,14 @@
|
||||
#define ATTR_MTIME_SET (1 << 8)
|
||||
#endif
|
||||
|
||||
#ifndef ATTR_UID_SET
|
||||
#define ATTR_UID_SET (1 << 9)
|
||||
#endif
|
||||
|
||||
#ifndef ATTR_GID_SET
|
||||
#define ATTR_GID_SET (1 << 10)
|
||||
#endif
|
||||
|
||||
#ifndef AT_SYMLINK_NOFOLLOW
|
||||
#define AT_SYMLINK_NOFOLLOW 0x100
|
||||
#endif
|
||||
|
||||
@@ -175,20 +175,25 @@ int dfs_file_isdir(const char *path);
|
||||
int dfs_file_access(const char *path, mode_t mode);
|
||||
int dfs_file_chdir(const char *path);
|
||||
char *dfs_file_getcwd(char *buf, size_t size);
|
||||
char *dfs_nolink_path(struct dfs_mnt **mnt, char *fullpath, int mode);
|
||||
|
||||
#ifdef RT_USING_SMART
|
||||
int dfs_file_mmap2(struct dfs_file *file, struct dfs_mmap2_args *mmap2);
|
||||
|
||||
int dfs_file_mmap(struct dfs_file *file, struct dfs_mmap2_args *mmap2);
|
||||
#endif
|
||||
|
||||
char *dfs_nolink_path(struct dfs_mnt **mnt, char *fullpath, int mode);
|
||||
|
||||
/* 0x5254 is just a magic number to make these relatively unique ("RT") */
|
||||
#define RT_FIOFTRUNCATE 0x52540000U
|
||||
#define RT_FIOGETADDR 0x52540001U
|
||||
#define RT_FIOMMAP2 0x52540002U
|
||||
|
||||
/* dfs_file_realpath mode */
|
||||
#define DFS_REALPATH_EXCEPT_LAST 0
|
||||
#define DFS_REALPATH_EXCEPT_NONE 1
|
||||
#define DFS_REALPATH_ONLY_LAST 3
|
||||
|
||||
char *dfs_file_realpath(struct dfs_mnt **mnt, const char *fullpath, int mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,9 @@ struct dfs_partition
|
||||
struct dfs_attr
|
||||
{
|
||||
unsigned int ia_valid;
|
||||
mode_t st_mode;
|
||||
uid_t st_uid;
|
||||
gid_t st_gid;
|
||||
mode_t st_mode;
|
||||
struct timespec ia_atime;
|
||||
struct timespec ia_mtime;
|
||||
};
|
||||
|
||||
@@ -23,6 +23,8 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
struct rt_varea;
|
||||
struct rt_aspace;
|
||||
struct dfs_vnode;
|
||||
struct dfs_dentry;
|
||||
struct dfs_aspace;
|
||||
@@ -30,7 +32,8 @@ struct dfs_aspace;
|
||||
struct dfs_mmap
|
||||
{
|
||||
rt_list_t mmap_node;
|
||||
struct rt_varea *varea;
|
||||
struct rt_aspace *aspace;
|
||||
void *vaddr;
|
||||
};
|
||||
|
||||
struct dfs_page
|
||||
|
||||
Reference in New Issue
Block a user