mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-27 15:24:11 +08:00
[dfs] enable procfs and tempfs in default when using smart; fix LWIP_ROUTE warning issue.
This commit is contained in:
@@ -187,7 +187,7 @@ if RT_USING_SMART
|
|||||||
default y
|
default y
|
||||||
config RT_USING_DFS_PROCFS
|
config RT_USING_DFS_PROCFS
|
||||||
bool "Enable proc file system"
|
bool "Enable proc file system"
|
||||||
default n
|
default y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config RT_USING_DFS_CROMFS
|
config RT_USING_DFS_CROMFS
|
||||||
@@ -204,11 +204,13 @@ endif
|
|||||||
|
|
||||||
config RT_USING_DFS_TMPFS
|
config RT_USING_DFS_TMPFS
|
||||||
bool "Enable TMP file system"
|
bool "Enable TMP file system"
|
||||||
|
default y if RT_USING_SMART
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config RT_USING_DFS_MQUEUE
|
config RT_USING_DFS_MQUEUE
|
||||||
bool "Enable MQUEUE file system"
|
bool "Enable MQUEUE file system"
|
||||||
select RT_USING_DEV_BUS
|
select RT_USING_DEV_BUS
|
||||||
|
default y if RT_USING_SMART
|
||||||
default n
|
default n
|
||||||
|
|
||||||
if RT_USING_DFS_V1
|
if RT_USING_DFS_V1
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ static void *seq_next(struct dfs_seq_file *seq, void *data, off_t *index)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LWIP_ROUTE
|
||||||
static void route_show(const char *name, uint32_t ip_addr, uint32_t netmask, void *parameter)
|
static void route_show(const char *name, uint32_t ip_addr, uint32_t netmask, void *parameter)
|
||||||
{
|
{
|
||||||
struct dfs_seq_file *seq = (struct dfs_seq_file *)parameter;
|
struct dfs_seq_file *seq = (struct dfs_seq_file *)parameter;
|
||||||
@@ -66,6 +67,7 @@ static void route_show(const char *name, uint32_t ip_addr, uint32_t netmask, voi
|
|||||||
dfs_seq_printf(seq, "%d ", 0);
|
dfs_seq_printf(seq, "%d ", 0);
|
||||||
dfs_seq_printf(seq, "%d\n", 0);
|
dfs_seq_printf(seq, "%d\n", 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int seq_show(struct dfs_seq_file *seq, void *data)
|
static int seq_show(struct dfs_seq_file *seq, void *data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ static int dfs_procfs_stat(struct dfs_dentry *dentry, struct stat *st)
|
|||||||
{
|
{
|
||||||
vnode = dentry->vnode;
|
vnode = dentry->vnode;
|
||||||
|
|
||||||
st->st_dev = (dev_t)(dentry->mnt->dev_id);
|
st->st_dev = (dev_t)(rt_ubase_t)(dentry->mnt->dev_id);
|
||||||
st->st_ino = (ino_t)dfs_dentry_full_path_crc32(dentry);
|
st->st_ino = (ino_t)dfs_dentry_full_path_crc32(dentry);
|
||||||
|
|
||||||
st->st_gid = vnode->gid;
|
st->st_gid = vnode->gid;
|
||||||
|
|||||||
@@ -158,6 +158,11 @@ static int fstab_mnt_init(void)
|
|||||||
msh_exec_script("fstab.sh", 16);
|
msh_exec_script("fstab.sh", 16);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_DFS_PROCFS
|
||||||
|
mkdir("/proc", 0755);
|
||||||
|
dfs_mount(RT_NULL, "/proc", "procfs", 0, RT_NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
LOG_I("File system initialization done");
|
LOG_I("File system initialization done");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user