Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
d2fe0e78
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
大约 2 年 前同步成功
通知
475
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看板
提交
d2fe0e78
编写于
8月 04, 2021
作者:
O
openharmony_ci
提交者:
Gitee
8月 04, 2021
浏览文件
操作
浏览文件
下载
差异文件
!498 LiteOS_A BBOX Codex整改
Merge pull request !498 from pcwlno1/bbox_codex
上级
d169cad6
6a5a0326
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
9 deletion
+23
-9
kernel/common/blackbox/los_blackbox_common.c
kernel/common/blackbox/los_blackbox_common.c
+8
-4
kernel/common/blackbox/los_blackbox_core.c
kernel/common/blackbox/los_blackbox_core.c
+15
-5
未找到文件。
kernel/common/blackbox/los_blackbox_common.c
浏览文件 @
d2fe0e78
...
@@ -113,10 +113,14 @@ int SaveBasicErrorInfo(const char *filePath, struct ErrorInfo *info)
...
@@ -113,10 +113,14 @@ int SaveBasicErrorInfo(const char *filePath, struct ErrorInfo *info)
return
-
1
;
return
-
1
;
}
}
(
void
)
memset_s
(
buf
,
ERROR_INFO_MAX_LEN
,
0
,
ERROR_INFO_MAX_LEN
);
(
void
)
memset_s
(
buf
,
ERROR_INFO_MAX_LEN
,
0
,
ERROR_INFO_MAX_LEN
);
(
void
)
snprintf_s
(
buf
,
ERROR_INFO_MAX_LEN
,
ERROR_INFO_MAX_LEN
-
1
,
if
(
snprintf_s
(
buf
,
ERROR_INFO_MAX_LEN
,
ERROR_INFO_MAX_LEN
-
1
,
ERROR_INFO_HEADER_FORMAT
,
info
->
event
,
info
->
module
,
info
->
errorDesc
);
ERROR_INFO_HEADER_FORMAT
,
info
->
event
,
info
->
module
,
info
->
errorDesc
)
!=
-
1
)
{
*
(
buf
+
ERROR_INFO_MAX_LEN
-
1
)
=
'\0'
;
*
(
buf
+
ERROR_INFO_MAX_LEN
-
1
)
=
'\0'
;
(
void
)
FullWriteFile
(
filePath
,
buf
,
strlen
(
buf
),
0
);
(
void
)
FullWriteFile
(
filePath
,
buf
,
strlen
(
buf
),
0
);
}
else
{
BBOX_PRINT_ERR
(
"buf is not enough or snprintf_s failed!
\n
"
);
}
(
void
)
LOS_MemFree
(
m_aucSysMem1
,
buf
);
(
void
)
LOS_MemFree
(
m_aucSysMem1
,
buf
);
return
0
;
return
0
;
...
...
kernel/common/blackbox/los_blackbox_core.c
浏览文件 @
d2fe0e78
...
@@ -80,10 +80,16 @@ static void FormatErrorInfo(struct ErrorInfo *info,
...
@@ -80,10 +80,16 @@ static void FormatErrorInfo(struct ErrorInfo *info,
}
}
(
void
)
memset_s
(
info
,
sizeof
(
*
info
),
0
,
sizeof
(
*
info
));
(
void
)
memset_s
(
info
,
sizeof
(
*
info
),
0
,
sizeof
(
*
info
));
(
void
)
strncpy_s
(
info
->
event
,
sizeof
(
info
->
event
),
event
,
Min
(
strlen
(
event
),
sizeof
(
info
->
event
)
-
1
));
if
(
strncpy_s
(
info
->
event
,
sizeof
(
info
->
event
),
event
,
Min
(
strlen
(
event
),
sizeof
(
info
->
event
)
-
1
))
!=
EOK
)
{
(
void
)
strncpy_s
(
info
->
module
,
sizeof
(
info
->
module
),
module
,
Min
(
strlen
(
module
),
sizeof
(
info
->
module
)
-
1
));
BBOX_PRINT_ERR
(
"info->event is not enough or strncpy_s failed!
\n
"
);
(
void
)
strncpy_s
(
info
->
errorDesc
,
sizeof
(
info
->
errorDesc
),
errorDesc
,
}
Min
(
strlen
(
errorDesc
),
sizeof
(
info
->
errorDesc
)
-
1
));
if
(
strncpy_s
(
info
->
module
,
sizeof
(
info
->
module
),
module
,
Min
(
strlen
(
module
),
sizeof
(
info
->
module
)
-
1
))
!=
EOK
)
{
BBOX_PRINT_ERR
(
"info->module is not enough or strncpy_s failed!
\n
"
);
}
if
(
strncpy_s
(
info
->
errorDesc
,
sizeof
(
info
->
errorDesc
),
errorDesc
,
Min
(
strlen
(
errorDesc
),
sizeof
(
info
->
errorDesc
)
-
1
))
!=
EOK
)
{
BBOX_PRINT_ERR
(
"info->errorDesc is not enough or strncpy_s failed!
\n
"
);
}
}
}
#ifdef LOSCFG_FS_VFS
#ifdef LOSCFG_FS_VFS
...
@@ -351,7 +357,11 @@ int BBoxRegisterModuleOps(struct ModuleOps *ops)
...
@@ -351,7 +357,11 @@ int BBoxRegisterModuleOps(struct ModuleOps *ops)
return
-
1
;
return
-
1
;
}
}
(
void
)
memset_s
(
newOps
,
sizeof
(
*
newOps
),
0
,
sizeof
(
*
newOps
));
(
void
)
memset_s
(
newOps
,
sizeof
(
*
newOps
),
0
,
sizeof
(
*
newOps
));
(
void
)
memcpy_s
(
&
newOps
->
ops
,
sizeof
(
newOps
->
ops
),
ops
,
sizeof
(
*
ops
));
if
(
memcpy_s
(
&
newOps
->
ops
,
sizeof
(
newOps
->
ops
),
ops
,
sizeof
(
*
ops
))
!=
EOK
)
{
BBOX_PRINT_ERR
(
"newOps->ops is not enough or memcpy_s failed!
\n
"
);
(
void
)
LOS_MemFree
(
m_aucSysMem1
,
newOps
);
return
-
1
;
}
if
(
LOS_SemPend
(
g_opsListSem
,
LOS_WAIT_FOREVER
)
!=
LOS_OK
)
{
if
(
LOS_SemPend
(
g_opsListSem
,
LOS_WAIT_FOREVER
)
!=
LOS_OK
)
{
BBOX_PRINT_ERR
(
"Request g_opsListSem failed!
\n
"
);
BBOX_PRINT_ERR
(
"Request g_opsListSem failed!
\n
"
);
(
void
)
LOS_MemFree
(
m_aucSysMem1
,
newOps
);
(
void
)
LOS_MemFree
(
m_aucSysMem1
,
newOps
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录