Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
21d5bfb6
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看板
提交
21d5bfb6
编写于
7月 01, 2021
作者:
Z
zhong_ning
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify l1 build
Signed-off-by:
N
zhong_ning
<
zhong_ning@hoperun.com
>
上级
924b03da
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
26 addition
and
42 deletion
+26
-42
interfaces/innerkits/reboot/BUILD.gn
interfaces/innerkits/reboot/BUILD.gn
+2
-3
interfaces/innerkits/socket/BUILD.gn
interfaces/innerkits/socket/BUILD.gn
+2
-6
services/BUILD.gn
services/BUILD.gn
+8
-9
services/include/init_adapter.h
services/include/init_adapter.h
+1
-1
services/log/BUILD.gn
services/log/BUILD.gn
+4
-12
services/param/BUILD.gn
services/param/BUILD.gn
+3
-7
services/src/init_capability.c
services/src/init_capability.c
+1
-1
services/src/init_service_manager.c
services/src/init_service_manager.c
+5
-3
未找到文件。
interfaces/innerkits/reboot/BUILD.gn
浏览文件 @
21d5bfb6
...
...
@@ -25,9 +25,8 @@ ohos_static_library("libreboot") {
]
deps = [
"//third_party/bounds_checking_function:libsec_static",
"//base/startup/init_lite/services/param:paramclient",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param:paramclient",
"//third_party/bounds_checking_function:libsec_static",
]
}
interfaces/innerkits/socket/BUILD.gn
浏览文件 @
21d5bfb6
...
...
@@ -17,11 +17,7 @@ ohos_static_library("libsocket") {
"//base/startup/init_lite/interfaces/innerkits/socket/init_socket_api.c",
]
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
]
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
deps = [
]
deps = []
}
services/BUILD.gn
浏览文件 @
21d5bfb6
...
...
@@ -25,13 +25,13 @@ if (defined(ohos_lite)) {
"src/init_import.c",
"src/init_jobs.c",
"src/init_read_cfg.c",
"src/init_reboot.c",
"src/init_service.c",
"src/init_service_manager.c",
"src/init_service_socket.c",
"src/init_signal_handler.c",
"src/init_utils.c",
"src/main.c",
"src/init_reboot.c",
]
include_dirs = [
...
...
@@ -76,9 +76,8 @@ if (defined(ohos_lite)) {
if (ohos_build_type == "debug") {
group("unittest") {
deps = [
"//base/startup/init_lite/services/test/unittest/common:unittest",
]
deps =
[ "//base/startup/init_lite/services/test/unittest/common:unittest" ]
}
}
} else {
...
...
@@ -94,8 +93,8 @@ if (defined(ohos_lite)) {
"//base/startup/init_lite/services/log",
]
deps = [
"//third_party/bounds_checking_function:libsec_static",
"//base/startup/init_lite/services/log:init_log",
"//third_party/bounds_checking_function:libsec_static",
]
install_enable = true
part_name = "init"
...
...
@@ -110,13 +109,13 @@ if (defined(ohos_lite)) {
"src/init_import.c",
"src/init_jobs.c",
"src/init_read_cfg.c",
"src/init_reboot.c",
"src/init_service.c",
"src/init_service_manager.c",
"src/init_service_socket.c",
"src/init_signal_handler.c",
"src/init_utils.c",
"src/main.c",
"src/init_reboot.c",
]
include_dirs = [
"//base/startup/init_lite/services/include/param",
...
...
@@ -127,8 +126,8 @@ if (defined(ohos_lite)) {
"//third_party/libuv/include",
]
deps = [
"//base/startup/init_lite/services/param:paramservice",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param:paramservice",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson_static",
]
...
...
@@ -152,10 +151,10 @@ if (defined(ohos_lite)) {
":init",
":init.cfg",
":updaterueventd",
"//base/startup/init_lite/services/param:paramservice",
"//base/startup/init_lite/services/param:setparam",
"//base/startup/init_lite/services/param:getparam",
"//base/startup/init_lite/services/param:paramclient",
"//base/startup/init_lite/services/param:paramservice",
"//base/startup/init_lite/services/param:setparam",
"//base/startup/init_lite/services/reboot:reboot",
]
}
...
...
services/include/init_adapter.h
浏览文件 @
21d5bfb6
...
...
@@ -16,7 +16,7 @@
#ifndef BASE_STARTUP_INITLITE_ADAPTER_H
#define BASE_STARTUP_INITLITE_ADAPTER_H
#if
def OHOS_LITE
#if
defined OHOS_LITE && !defined __LINUX__
#include <sys/capability.h>
#else
#include <linux/capability.h>
...
...
services/log/BUILD.gn
浏览文件 @
21d5bfb6
...
...
@@ -12,22 +12,14 @@
# limitations under the License.
if (defined(ohos_lite)) {
static_library("init_log") {
sources = [
"init_log.c",
]
public_deps = [
"//third_party/bounds_checking_function:libsec_static",
]
sources = [ "init_log.c" ]
public_deps = [ "//third_party/bounds_checking_function:libsec_static" ]
}
} else {
import("//build/ohos.gni")
ohos_static_library("init_log") {
sources = [
"init_log.c",
]
deps = [
"//third_party/bounds_checking_function:libsec_static",
]
sources = [ "init_log.c" ]
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
part_name = "startup"
subsystem_name = "startup"
}
...
...
services/param/BUILD.gn
浏览文件 @
21d5bfb6
...
...
@@ -61,18 +61,16 @@ ohos_static_library("paramclient") {
]
deps = [
"//base/startup/init_lite/services/log:init_log",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/libuv:uv_static",
"//base/startup/init_lite/services/log:init_log"
]
part_name = "init"
subsystem_name = "startup"
}
ohos_executable("getparam") {
sources = [
"cmd/param_get.c",
]
sources = [ "cmd/param_get.c" ]
include_dirs = [
"include",
"//base/startup/init_lite/services/include/param",
...
...
@@ -89,9 +87,7 @@ ohos_executable("getparam") {
}
ohos_executable("setparam") {
sources = [
"cmd/param_set.c",
]
sources = [ "cmd/param_set.c" ]
include_dirs = [
"include",
"//base/startup/init_lite/services/include/param",
...
...
services/src/init_capability.c
浏览文件 @
21d5bfb6
...
...
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if
def OHOS_LITE
#if
defined OHOS_LITE && !defined __LINUX__
#include <sys/capability.h>
#else
#include <linux/capability.h>
...
...
services/src/init_service_manager.c
浏览文件 @
21d5bfb6
...
...
@@ -738,8 +738,10 @@ void StopServiceByName(const char* servName)
void
StopAllServices
()
{
for
(
int
i
=
0
;
i
<
g_servicesCnt
;
i
++
)
{
if
(
ServiceStop
(
&
g_services
[
i
])
!=
SERVICE_SUCCESS
)
{
INIT_LOGE
(
"StopAllServices, service %s stop failed!
\n
"
,
g_services
[
i
].
name
);
if
(
strcmp
(
g_services
[
i
].
name
,
"console"
)
!=
0
&&
strcmp
(
g_services
[
i
].
name
,
"ueventd"
)
!=
0
)
{
if
(
ServiceStop
(
&
g_services
[
i
])
!=
SERVICE_SUCCESS
)
{
INIT_LOGE
(
"[Init] StopAllServices, service %s stop failed!
\n
"
,
g_services
[
i
].
name
);
}
}
}
}
...
...
@@ -762,7 +764,7 @@ void ReapServiceByPID(int pid)
// important process exit, need to reboot system
g_services
[
i
].
pid
=
-
1
;
StopAllServices
();
RebootSystem
();
//
RebootSystem();
}
ServiceReap
(
&
g_services
[
i
]);
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录