Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
ad3b1681
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
接近 2 年 前同步成功
通知
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看板
提交
ad3b1681
编写于
5月 06, 2022
作者:
M
Mupceet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: codestyle
Signed-off-by:
N
Mupceet
<
laiguizhong@huawei.com
>
上级
fee0d696
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
24 addition
and
12 deletion
+24
-12
services/init/standard/init_cmds.c
services/init/standard/init_cmds.c
+4
-6
services/loopevent/loop/le_loop.h
services/loopevent/loop/le_loop.h
+4
-0
services/loopevent/task/le_task.h
services/loopevent/task/le_task.h
+7
-4
services/param/watcher/agent/watcher_manager_kits.cpp
services/param/watcher/agent/watcher_manager_kits.cpp
+1
-1
test/unittest/param/dac_unittest.cpp
test/unittest/param/dac_unittest.cpp
+2
-0
test/unittest/param/param_stub.h
test/unittest/param/param_stub.h
+2
-0
test/unittest/param/param_unittest.cpp
test/unittest/param/param_unittest.cpp
+2
-0
test/unittest/param/selinux_unittest.cpp
test/unittest/param/selinux_unittest.cpp
+2
-0
test/unittest/ueventd/ueventd_config_unittest.cpp
test/unittest/ueventd/ueventd_config_unittest.cpp
+0
-1
未找到文件。
services/init/standard/init_cmds.c
浏览文件 @
ad3b1681
...
...
@@ -44,8 +44,6 @@
#include <policycoreutils.h>
#endif
#define ARRAY_LEN(array) (sizeof(array) / (sizeof((array)[0])))
static
const
char
*
g_fscryptPolicyKey
=
"fscrypt.policy.config"
;
int
GetParamValue
(
const
char
*
symValue
,
unsigned
int
symLen
,
char
*
paramValue
,
unsigned
int
paramLen
)
...
...
@@ -425,7 +423,7 @@ static void DoInitGlobalKey(const struct CmdArgs *ctx)
"init_global_key"
,
NULL
};
int
argc
=
ARRAY_LEN
(
argv
);
int
argc
=
ARRAY_LEN
GTH
(
argv
);
int
ret
=
SyncExecCommand
(
argc
,
argv
);
INIT_LOGI
(
"DoInitGlobalKey: end, ret = %d"
,
ret
);
}
...
...
@@ -443,7 +441,7 @@ static void DoInitMainUser(const struct CmdArgs *ctx)
"init_main_user"
,
NULL
};
int
argc
=
ARRAY_LEN
(
argv
);
int
argc
=
ARRAY_LEN
GTH
(
argv
);
int
ret
=
SyncExecCommand
(
argc
,
argv
);
INIT_LOGI
(
"DoInitMainUser: end, ret = %d"
,
ret
);
}
...
...
@@ -477,7 +475,7 @@ static void DoMkswap(const struct CmdArgs *ctx)
ctx
->
argv
[
0
],
NULL
};
int
argc
=
ARRAY_LEN
(
argv
);
int
argc
=
ARRAY_LEN
GTH
(
argv
);
int
ret
=
SyncExecCommand
(
argc
,
argv
);
INIT_LOGI
(
"DoMkswap: end, ret = %d"
,
ret
);
}
...
...
@@ -494,7 +492,7 @@ static void DoSwapon(const struct CmdArgs *ctx)
ctx
->
argv
[
0
],
NULL
};
int
argc
=
ARRAY_LEN
(
argv
);
int
argc
=
ARRAY_LEN
GTH
(
argv
);
int
ret
=
SyncExecCommand
(
argc
,
argv
);
INIT_LOGI
(
"DoSwapon: end, ret = %d"
,
ret
);
}
...
...
services/loopevent/loop/le_loop.h
浏览文件 @
ad3b1681
...
...
@@ -37,7 +37,11 @@ typedef struct EventLoop_ {
uint32_t
maxevents
;
uint32_t
timeout
;
uint32_t
stop
;
#ifdef LOOP_EVENT_USE_MUTEX
LoopMutex
mutex
;
#else
char
mutex
;
#endif
HashMapHandle
taskMap
;
}
EventLoop
;
...
...
services/loopevent/task/le_task.h
浏览文件 @
ad3b1681
...
...
@@ -23,10 +23,9 @@
#include "loop_event.h"
#ifndef LOOP_EVENT_USE_MUTEX
#define LoopMutex char
#define LoopMutexInit(x)
#define LoopMutexLock(x)
#define LoopMutexUnlock(x)
#define LoopMutexInit(x) (void)(x)
#define LoopMutexLock(x) (void)(x)
#define LoopMutexUnlock(x) (void)(x)
#else
#include <pthread.h>
#define LoopMutex pthread_mutex_t
...
...
@@ -79,7 +78,11 @@ typedef struct {
typedef
struct
{
BaseTask
base
;
#ifdef LOOP_EVENT_USE_MUTEX
LoopMutex
mutex
;
#else
char
mutex
;
#endif
ListHead
buffHead
;
}
StreamTask
;
...
...
services/param/watcher/agent/watcher_manager_kits.cpp
浏览文件 @
ad3b1681
...
...
@@ -15,10 +15,10 @@
#include "watcher_manager_kits.h"
#include "if_system_ability_manager.h"
#include "init_param.h"
#include "iservice_registry.h"
#include "iwatcher.h"
#include "iwatcher_manager.h"
#include "init_param.h"
#include "system_ability_definition.h"
#include "watcher_utils.h"
...
...
test/unittest/param/dac_unittest.cpp
浏览文件 @
ad3b1681
...
...
@@ -23,6 +23,7 @@
using
namespace
testing
::
ext
;
using
namespace
std
;
namespace
init_ut
{
class
DacUnitTest
:
public
::
testing
::
Test
{
public:
DacUnitTest
()
{}
...
...
@@ -252,3 +253,4 @@ HWTEST_F(DacUnitTest, TestClientDacCheckFilePermission, TestSize.Level0)
DacUnitTest
test
;
test
.
TestClientDacCheckFilePermission
(
STARTUP_INIT_UT_PATH
"/trigger_test.cfg"
);
}
}
\ No newline at end of file
test/unittest/param/param_stub.h
浏览文件 @
ad3b1681
...
...
@@ -29,6 +29,8 @@ extern "C" {
#endif
#endif
#define TEST_PATH "/data/ueventd_ut"
void
PrepareInitUnitTestEnv
(
void
);
void
TestSetSelinuxOps
(
void
);
void
SetTestPermissionResult
(
int
result
);
...
...
test/unittest/param/param_unittest.cpp
浏览文件 @
ad3b1681
...
...
@@ -40,6 +40,7 @@ static int CheckServerParamValue(const char *name, const char *expectValue)
return
0
;
}
namespace
init_ut
{
class
ParamUnitTest
:
public
::
testing
::
Test
{
public:
ParamUnitTest
()
{}
...
...
@@ -388,3 +389,4 @@ HWTEST_F(ParamUnitTest, TestDumpParamMemory, TestSize.Level0)
ParamUnitTest
test
;
test
.
TestDumpParamMemory
();
}
}
test/unittest/param/selinux_unittest.cpp
浏览文件 @
ad3b1681
...
...
@@ -23,6 +23,7 @@
using
namespace
testing
::
ext
;
using
namespace
std
;
namespace
init_ut
{
class
SelinuxUnitTest
:
public
::
testing
::
Test
{
public:
SelinuxUnitTest
()
{}
...
...
@@ -174,3 +175,4 @@ HWTEST_F(SelinuxUnitTest, TestClientDacCheckParaPermission, TestSize.Level0)
test
.
TestClientSelinuxCheckParaPermissionWrite
(
"aaa.bbb.bbb.ccc"
,
"user:group1:r"
);
test
.
TestClientSelinuxCheckParaPermissionRead
(
"aaa.bbb.bbb.ccc"
,
"user:group1:r"
);
}
}
\ No newline at end of file
test/unittest/ueventd/ueventd_config_unittest.cpp
浏览文件 @
ad3b1681
...
...
@@ -27,7 +27,6 @@
using
namespace
std
;
using
namespace
testing
::
ext
;
#define TEST_PATH "/data/ueventd_ut"
namespace
ueventd_ut
{
static
bool
FileExists
(
const
std
::
string
&
file
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录