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:
Shell
2024-03-28 23:42:56 +08:00
committed by GitHub
co-authored by xqyjlj
parent 40e26f4909
commit 83e95bdff4
131 changed files with 14954 additions and 6478 deletions
+12
View File
@@ -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
+8 -3
View File
@@ -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
+3 -1
View File
@@ -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;
};
+4 -1
View File
@@ -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