mirror of https://github.com/RT-Thread/rt-thread
[dfs] enable procfs and tempfs in default when using smart; fix LWIP_ROUTE warning issue.
This commit is contained in:
parent
e9f6992fa1
commit
d1628a1cf3
|
@ -187,7 +187,7 @@ if RT_USING_SMART
|
|||
default y
|
||||
config RT_USING_DFS_PROCFS
|
||||
bool "Enable proc file system"
|
||||
default n
|
||||
default y
|
||||
endif
|
||||
|
||||
config RT_USING_DFS_CROMFS
|
||||
|
@ -204,11 +204,13 @@ endif
|
|||
|
||||
config RT_USING_DFS_TMPFS
|
||||
bool "Enable TMP file system"
|
||||
default y if RT_USING_SMART
|
||||
default n
|
||||
|
||||
config RT_USING_DFS_MQUEUE
|
||||
bool "Enable MQUEUE file system"
|
||||
select RT_USING_DEV_BUS
|
||||
default y if RT_USING_SMART
|
||||
default n
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#if LWIP_ROUTE
|
||||
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;
|
||||
|
@ -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\n", 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
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;
|
||||
|
||||
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_gid = vnode->gid;
|
||||
|
|
|
@ -158,6 +158,11 @@ static int fstab_mnt_init(void)
|
|||
msh_exec_script("fstab.sh", 16);
|
||||
#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");
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue