Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
0768ca1b
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
大约 1 年 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0768ca1b
编写于
6月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
6月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!867 Remove unnecessary logs in sandbox
Merge pull request !867 from handy/062721
上级
cfa21169
d0aa0f74
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
4 deletion
+1
-4
interfaces/innerkits/sandbox/sandbox.c
interfaces/innerkits/sandbox/sandbox.c
+1
-4
未找到文件。
interfaces/innerkits/sandbox/sandbox.c
100644 → 100755
浏览文件 @
0768ca1b
...
@@ -310,7 +310,6 @@ static int CheckAndMakeDir(const char *dir, mode_t mode)
...
@@ -310,7 +310,6 @@ static int CheckAndMakeDir(const char *dir, mode_t mode)
BEGET_LOGW
(
"Mount point
\'
%s
\'
already exist"
,
dir
);
BEGET_LOGW
(
"Mount point
\'
%s
\'
already exist"
,
dir
);
return
0
;
return
0
;
}
else
{
}
else
{
BEGET_LOGI
(
"Ready to create dir [%s] now ..."
,
dir
);
if
(
errno
==
ENOENT
)
{
if
(
errno
==
ENOENT
)
{
BEGET_ERROR_CHECK
(
MakeDirRecursive
(
dir
,
mode
)
==
0
,
return
-
1
,
BEGET_ERROR_CHECK
(
MakeDirRecursive
(
dir
,
mode
)
==
0
,
return
-
1
,
"Failed MakeDirRecursive %s, err=%d"
,
dir
,
errno
);
"Failed MakeDirRecursive %s, err=%d"
,
dir
,
errno
);
...
@@ -332,7 +331,7 @@ static int BindMount(const char *source, const char *target, unsigned long flags
...
@@ -332,7 +331,7 @@ static int BindMount(const char *source, const char *target, unsigned long flags
unsigned
long
tmpflags
=
flags
;
unsigned
long
tmpflags
=
flags
;
mode_t
mode
=
S_IRWXU
|
S_IRGRP
|
S_IXGRP
|
S_IROTH
|
S_IXOTH
;
mode_t
mode
=
S_IRWXU
|
S_IRGRP
|
S_IXGRP
|
S_IROTH
|
S_IXOTH
;
if
(
tag
==
SANDBOX_TAG_MOUNT_PATH
)
{
if
(
tag
==
SANDBOX_TAG_MOUNT_PATH
)
{
CheckAndMakeDir
(
target
,
mode
);
BEGET_ERROR_CHECK
(
CheckAndMakeDir
(
target
,
mode
)
==
0
,
return
-
1
,
"Failed make %s dir."
,
target
);
}
else
if
(
tag
==
SANDBOX_TAG_MOUNT_FILE
)
{
}
else
if
(
tag
==
SANDBOX_TAG_MOUNT_FILE
)
{
BEGET_ERROR_CHECK
(
CheckAndCreatFile
(
target
,
mode
)
==
0
,
return
-
1
,
"Failed make %s file."
,
target
);
BEGET_ERROR_CHECK
(
CheckAndCreatFile
(
target
,
mode
)
==
0
,
return
-
1
,
"Failed make %s file."
,
target
);
}
else
{
}
else
{
...
@@ -375,7 +374,6 @@ static int MountSandboxInfo(const mountlist_t *mounts, const char *rootPath, San
...
@@ -375,7 +374,6 @@ static int MountSandboxInfo(const mountlist_t *mounts, const char *rootPath, San
if
(
mounts
==
NULL
)
{
if
(
mounts
==
NULL
)
{
return
0
;
return
0
;
}
}
BEGET_LOGI
(
"MountSandboxInfo now ..."
);
BEGET_CHECK
(
mounts
->
info
!=
NULL
,
return
0
);
BEGET_CHECK
(
mounts
->
info
!=
NULL
,
return
0
);
while
(
mounts
!=
NULL
)
{
while
(
mounts
!=
NULL
)
{
mount_t
*
mount
=
mounts
->
info
;
mount_t
*
mount
=
mounts
->
info
;
...
@@ -383,7 +381,6 @@ static int MountSandboxInfo(const mountlist_t *mounts, const char *rootPath, San
...
@@ -383,7 +381,6 @@ static int MountSandboxInfo(const mountlist_t *mounts, const char *rootPath, San
char
target
[
PATH_MAX
]
=
{};
char
target
[
PATH_MAX
]
=
{};
BEGET_ERROR_CHECK
(
!
(
snprintf_s
(
target
,
PATH_MAX
,
PATH_MAX
-
1
,
"%s%s"
,
rootPath
,
mount
->
target
)
<
0
),
BEGET_ERROR_CHECK
(
!
(
snprintf_s
(
target
,
PATH_MAX
,
PATH_MAX
-
1
,
"%s%s"
,
rootPath
,
mount
->
target
)
<
0
),
return
-
1
,
"Failed snprintf_s err=%d"
,
errno
);
return
-
1
,
"Failed snprintf_s err=%d"
,
errno
);
BEGET_LOGI
(
"Do BindMount from [%s] to [%s] now ..."
,
source
,
target
);
int
rc
=
BindMount
(
source
,
target
,
mount
->
flags
,
tag
);
int
rc
=
BindMount
(
source
,
target
,
mount
->
flags
,
tag
);
if
(
rc
!=
0
)
{
if
(
rc
!=
0
)
{
BEGET_LOGW
(
"Failed bind mount %s to %s."
,
source
,
target
);
BEGET_LOGW
(
"Failed bind mount %s to %s."
,
source
,
target
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录