Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
b96b3561
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
b96b3561
编写于
7月 22, 2013
作者:
B
bernard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add mount table
上级
adc678da
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
49 addition
and
8 deletion
+49
-8
components/dfs/filesystems/elmfat/option/ccfile.c
components/dfs/filesystems/elmfat/option/ccfile.c
+1
-0
components/dfs/include/dfs_fs.h
components/dfs/include/dfs_fs.h
+11
-0
components/dfs/src/dfs_fs.c
components/dfs/src/dfs_fs.c
+27
-0
include/rtdef.h
include/rtdef.h
+7
-1
include/rtthread.h
include/rtthread.h
+1
-1
src/module.c
src/module.c
+2
-6
未找到文件。
components/dfs/filesystems/elmfat/option/ccfile.c
浏览文件 @
b96b3561
...
...
@@ -23,6 +23,7 @@ void ff_convert_init()
if
(
uni2gbk_fd
<
0
)
rt_kprintf
(
"Unable to open Unicode to GBK look up table.
\r\n
"
);
}
INIT_APP_EXPORT
(
ff_convert_init
);
rt_uint16_t
ff_convert
(
rt_uint16_t
src
,
rt_uint32_t
dir
)
{
...
...
components/dfs/include/dfs_fs.h
浏览文件 @
b96b3561
...
...
@@ -82,6 +82,16 @@ struct dfs_partition
rt_sem_t
lock
;
};
/* mount table */
struct
dfs_mount_tbl
{
const
char
*
device_name
;
const
char
*
path
;
const
char
*
filesystemtype
;
unsigned
long
rwflag
;
const
void
*
data
;
};
int
dfs_register
(
const
struct
dfs_filesystem_operation
*
ops
);
struct
dfs_filesystem
*
dfs_filesystem_lookup
(
const
char
*
path
);
rt_err_t
dfs_filesystem_get_partition
(
struct
dfs_partition
*
part
,
...
...
@@ -98,6 +108,7 @@ int dfs_unmount(const char *specialfile);
/* extern variable */
extern
const
struct
dfs_filesystem_operation
*
filesystem_operation_table
[];
extern
struct
dfs_filesystem
filesystem_table
[];
extern
const
struct
dfs_mount_tbl
mount_table
[];
extern
char
working_directory
[];
...
...
components/dfs/src/dfs_fs.c
浏览文件 @
b96b3561
...
...
@@ -497,6 +497,33 @@ int dfs_statfs(const char *path, struct statfs *buffer)
return
-
1
;
}
#ifdef RT_USING_DFS_MNTTABLE
int
dfs_mount_table
(
void
)
{
int
index
;
while
(
1
)
{
if
(
mount_table
[
index
].
path
==
RT_NULL
)
break
;
if
(
dfs_mount
(
mount_table
[
index
].
device_name
,
mount_table
[
index
].
path
,
mount_table
[
index
].
filesystemtype
,
mount_table
[
index
].
rwflag
,
mount_table
[
index
].
data
)
!=
0
)
{
rt_kprintf
(
"mount fs[%s] on %s failed.
\n
"
,
mount_table
[
index
].
filesystemtype
,
mount_table
[
index
].
path
);
return
-
RT_ERROR
;
}
index
++
;
}
return
0
;
}
INIT_ENV_EXPORT
(
dfs_mount_table
);
#endif
#ifdef RT_USING_FINSH
#include <finsh.h>
void
mkfs
(
const
char
*
fs_name
,
const
char
*
device_name
)
...
...
include/rtdef.h
浏览文件 @
b96b3561
...
...
@@ -191,10 +191,16 @@ typedef int (*init_fn_t)(void);
/* board init routines will be called in board_init() function */
#define INIT_BOARD_EXPORT(fn) INIT_EXPORT(fn, "1")
/* device/component/fs/app init routines will be called in init_thread */
/* device initialization */
#define INIT_DEVICE_EXPORT(fn) INIT_EXPORT(fn, "2")
/* components initialization (dfs, lwip, ...) */
#define INIT_COMPONENT_EXPORT(fn) INIT_EXPORT(fn, "3")
/* file system initialization (dfs-elm, dfs-rom, ...) */
#define INIT_FS_EXPORT(fn) INIT_EXPORT(fn, "4")
#define INIT_APP_EXPORT(fn) INIT_EXPORT(fn, "5")
/* environment initialization (mount disk, ...) */
#define INIT_ENV_EXPORT(fn) INIT_EXPORT(fn, "5")
/* appliation initialization (rtgui application etc ...) */
#define INIT_APP_EXPORT(fn) INIT_EXPORT(fn, "6")
/* event length */
#define RT_EVENT_LENGTH 32
...
...
include/rtthread.h
浏览文件 @
b96b3561
...
...
@@ -452,7 +452,7 @@ rt_uint8_t rt_interrupt_get_nest(void);
/**
* application module
*/
void
rt_system_module_init
(
void
);
int
rt_system_module_init
(
void
);
/**
* @addtogroup KernelService
...
...
src/module.c
浏览文件 @
b96b3561
...
...
@@ -80,7 +80,7 @@ static struct rt_module_symtab *_rt_module_symtab_end = RT_NULL;
*
* This function will initialize system module
*/
void
rt_system_module_init
(
void
)
int
rt_system_module_init
(
void
)
{
#ifdef __GNUC__
extern
int
__rtmsymtab_start
;
...
...
@@ -100,6 +100,7 @@ void rt_system_module_init(void)
/* initialize heap semaphore */
rt_sem_init
(
&
mod_sem
,
"module"
,
1
,
RT_IPC_FLAG_FIFO
);
#endif
return
0
;
}
INIT_COMPONENT_EXPORT
(
rt_system_module_init
);
...
...
@@ -805,9 +806,6 @@ rt_module_t rt_module_load(const char *name, void *module_ptr)
if
(
elf_module
->
e_entry
!=
0
)
{
rt_uint32_t
*
stack_size
;
rt_uint8_t
*
priority
;
#ifdef RT_USING_SLAB
/* init module memory allocator */
module
->
mem_list
=
RT_NULL
;
...
...
@@ -1180,8 +1178,6 @@ rt_err_t rt_module_destroy(rt_module_t module)
*/
rt_err_t
rt_module_unload
(
rt_module_t
module
)
{
int
i
;
rt_err_t
result
;
struct
rt_object
*
object
;
struct
rt_list_node
*
list
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录