Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
9ab3e351
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
大约 1 年 前同步成功
通知
452
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9ab3e351
编写于
9月 27, 2021
作者:
F
Far
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: codex 清理
Close #I4BL3S Signed-off-by:
N
Far
<
yesiyuan2@huawei.com
>
上级
ecd9ca77
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
12 addition
and
0 deletion
+12
-0
fs/vfs/vnode.c
fs/vfs/vnode.c
+2
-0
kernel/extended/dynload/src/los_load_elf.c
kernel/extended/dynload/src/los_load_elf.c
+10
-0
未找到文件。
fs/vfs/vnode.c
浏览文件 @
9ab3e351
...
@@ -404,6 +404,8 @@ int VnodeLookupAt(const char *path, struct Vnode **result, uint32_t flags, struc
...
@@ -404,6 +404,8 @@ int VnodeLookupAt(const char *path, struct Vnode **result, uint32_t flags, struc
*
result
=
currentVnode
;
*
result
=
currentVnode
;
if
(
currentVnode
->
filePath
==
NULL
)
{
if
(
currentVnode
->
filePath
==
NULL
)
{
currentVnode
->
filePath
=
normalizedPath
;
currentVnode
->
filePath
=
normalizedPath
;
}
else
{
free
(
normalizedPath
);
}
}
return
ret
;
return
ret
;
}
else
if
(
VfsVnodePermissionCheck
(
currentVnode
,
EXEC_OP
))
{
}
else
if
(
VfsVnodePermissionCheck
(
currentVnode
,
EXEC_OP
))
{
...
...
kernel/extended/dynload/src/los_load_elf.c
浏览文件 @
9ab3e351
...
@@ -76,6 +76,10 @@ static int OsELFClose(int procFd)
...
@@ -76,6 +76,10 @@ static int OsELFClose(int procFd)
int
ret
;
int
ret
;
/* Process procfd convert to system global procfd */
/* Process procfd convert to system global procfd */
int
sysfd
=
DisassociateProcessFd
(
procFd
);
int
sysfd
=
DisassociateProcessFd
(
procFd
);
if
(
sysfd
<
0
)
{
return
-
EBADF
;
}
ret
=
close
(
sysfd
);
ret
=
close
(
sysfd
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
AssociateSystemFd
(
procFd
,
sysfd
);
AssociateSystemFd
(
procFd
,
sysfd
);
...
@@ -120,6 +124,10 @@ STATIC INT32 OsReadELFInfo(INT32 procfd, UINT8 *buffer, size_t readSize, off_t o
...
@@ -120,6 +124,10 @@ STATIC INT32 OsReadELFInfo(INT32 procfd, UINT8 *buffer, size_t readSize, off_t o
ssize_t
byteNum
;
ssize_t
byteNum
;
off_t
returnPos
;
off_t
returnPos
;
INT32
fd
=
GetAssociatedSystemFd
(
procfd
);
INT32
fd
=
GetAssociatedSystemFd
(
procfd
);
if
(
fd
<
0
)
{
PRINT_ERR
(
"%s[%d], Invalid procfd!
\n
"
,
__FUNCTION__
,
__LINE__
);
return
LOS_NOK
;
}
if
(
readSize
>
0
)
{
if
(
readSize
>
0
)
{
returnPos
=
lseek
(
fd
,
offset
,
SEEK_SET
);
returnPos
=
lseek
(
fd
,
offset
,
SEEK_SET
);
...
@@ -218,6 +226,8 @@ STATIC INT32 OsReadEhdr(const CHAR *fileName, ELFInfo *elfInfo, BOOL isExecFile)
...
@@ -218,6 +226,8 @@ STATIC INT32 OsReadEhdr(const CHAR *fileName, ELFInfo *elfInfo, BOOL isExecFile)
ret
=
fs_getfilep
(
GetAssociatedSystemFd
(
elfInfo
->
procfd
),
&
OsCurrProcessGet
()
->
execFile
);
ret
=
fs_getfilep
(
GetAssociatedSystemFd
(
elfInfo
->
procfd
),
&
OsCurrProcessGet
()
->
execFile
);
if
(
ret
)
{
if
(
ret
)
{
PRINT_ERR
(
"%s[%d], Failed to get struct file %s!
\n
"
,
__FUNCTION__
,
__LINE__
,
fileName
);
PRINT_ERR
(
"%s[%d], Failed to get struct file %s!
\n
"
,
__FUNCTION__
,
__LINE__
,
fileName
);
/* File will be closed by OsLoadELFFile */
return
ret
;
}
}
}
}
#endif
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录