鸿蒙研究站
|
官方文档
|
源码分析
== 鸿蒙内核参考手册 ==
内核注释
|
论坛
|
赞助作者
更新日期: 2022/06/01 来源: https://gitee.com/weharmony/kernel_liteos_a_note
函数
proc_init.c 文件参考
浏览源代码.
函数
void
ProcFsInit
(
void
)
init proc fs
更多...
LOS_MODULE_INIT
(
ProcFsInit
, LOS_INIT_LEVEL_KMOD_EXTENDED)
函数说明
◆
LOS_MODULE_INIT()
LOS_MODULE_INIT
(
ProcFsInit
,
LOS_INIT_LEVEL_KMOD_EXTENDED
)
◆
ProcFsInit()
void
ProcFsInit
(
void
)
init proc fs
Description:
This API is used to init proc fs.
注意
None.
参数
NONE
返回值
NONE
Dependency:
proc_fs.h
: the header file that contains the API declaration.
参见
ProcFsInit
在文件
proc_init.c
第
43
行定义.
44
{
45
int
ret;
46
47
ret = mkdir(PROCFS_MOUNT_POINT, PROCFS_DEFAULT_MODE);
//创建 "/proc"
48
if
(ret < 0) {
49
PRINT_ERR(
"failed to mkdir %s, errno = %d\n"
, PROCFS_MOUNT_POINT, get_errno());
50
return
;
51
}
52
//装载文件系统
53
ret = mount(NULL, PROCFS_MOUNT_POINT,
"procfs"
, 0, NULL);
//将null 挂到 /proc 上
54
if
(ret) {
55
PRINT_ERR(
"mount procfs err %d\n"
, ret);
56
return
;
57
}
58
59
ProcMountsInit
();
//初始化 /proc/mounts
60
#if defined(LOSCFG_SHELL_CMD_DEBUG) && defined(LOSCFG_KERNEL_VM)
61
ProcVmmInit
();
//初始化 /proc/vmm
62
#endif
63
ProcProcessInit
();
//初始化 /proc/process
64
ProcUptimeInit
();
//初始化 /proc/uptime
65
ProcFsCacheInit
();
66
ProcFdInit
();
67
#ifdef LOSCFG_KERNEL_PM
68
ProcPmInit
();
69
#endif
70
}
ProcFsCacheInit
void ProcFsCacheInit(void)
Definition:
fs_cache_proc.c:218
ProcMountsInit
void ProcMountsInit(void)
Definition:
mounts_proc.c:90
ProcUptimeInit
void ProcUptimeInit(void)
Definition:
uptime_proc.c:77
ProcProcessInit
void ProcProcessInit(void)
Definition:
process_proc.c:48
ProcFdInit
void ProcFdInit(void)
Definition:
fd_proc.c:136
ProcPmInit
void ProcPmInit(void)
Definition:
power_proc.c:148
ProcVmmInit
void ProcVmmInit(void)
Definition:
vmm_proc.c:106
函数调用图:
fs
proc
os_adapt
proc_init.c
公众号:鸿蒙研究站(weharmonyos)
|
论坛: bbs.weharmonyos.com
| 制作者
鸿蒙研究站 | weharmonyos.com