diff --git a/components/dfs/Kconfig b/components/dfs/Kconfig index 9b2f1b40de8..17052fe2a48 100644 --- a/components/dfs/Kconfig +++ b/components/dfs/Kconfig @@ -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 diff --git a/components/dfs/dfs_v2/filesystems/procfs/proc_net.c b/components/dfs/dfs_v2/filesystems/procfs/proc_net.c index e2b38e0c8db..76707beffb2 100644 --- a/components/dfs/dfs_v2/filesystems/procfs/proc_net.c +++ b/components/dfs/dfs_v2/filesystems/procfs/proc_net.c @@ -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) { diff --git a/components/dfs/dfs_v2/filesystems/procfs/procfs.c b/components/dfs/dfs_v2/filesystems/procfs/procfs.c index c8b5c1477c7..8cba8ed48c6 100644 --- a/components/dfs/dfs_v2/filesystems/procfs/procfs.c +++ b/components/dfs/dfs_v2/filesystems/procfs/procfs.c @@ -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; diff --git a/components/drivers/core/mnt.c b/components/drivers/core/mnt.c index c59fcd8b897..02a68d46dd3 100644 --- a/components/drivers/core/mnt.c +++ b/components/drivers/core/mnt.c @@ -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;