mirror of
https://gitee.com/openharmony/startup_init
synced 2025-02-25 07:00:55 +00:00
!1 【轻量级 PR】:remove unnecessary extern "C" in .c file
Merge pull request !1 from Gymee/N/A
This commit is contained in:
parent
e05864ccea
commit
f55113ce4b
@ -24,12 +24,6 @@
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
void RebootSystem()
|
||||
{
|
||||
#ifdef __LINUX__
|
||||
@ -51,10 +45,4 @@ int KeepCapability()
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
}
|
@ -24,12 +24,6 @@
|
||||
#include "init_service_manager.h"
|
||||
#include "securec.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MODE_LEN 4 // for chmod mode, format 0xxx
|
||||
#define DEFAULT_DIR_MODE 0755 // mkdir, default mode
|
||||
#define SPACES_CNT_IN_CMD_MAX 10 // mount, max number of spaces in cmdline
|
||||
@ -329,9 +323,3 @@ void DoCmd(const CmdLine* curCmd)
|
||||
printf("[Init] DoCmd, unknown cmd name %s.\n", curCmd->name);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -18,12 +18,6 @@
|
||||
#include "init_cmds.h"
|
||||
#include "securec.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define JOBS_ARR_NAME_IN_JSON "jobs"
|
||||
#define CMDS_ARR_NAME_IN_JSON "cmds"
|
||||
#define MAX_JOBS_COUNT 10
|
||||
@ -175,9 +169,3 @@ void ReleaseAllJobs()
|
||||
g_jobs = NULL;
|
||||
g_jobCnt = 0;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -25,12 +25,6 @@
|
||||
#include "init_service_manager.h"
|
||||
#include "securec.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static const long MAX_JSON_FILE_LEN = 102400; // max init.cfg size 100KB
|
||||
#define MAX_SERVICES_CNT_IN_FILE 100
|
||||
#define MAX_CAPS_CNT_FOR_ONE_SERVICE 100
|
||||
@ -304,9 +298,3 @@ void InitReadCfg()
|
||||
DoJob("post-init");
|
||||
ReleaseAllJobs();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
@ -23,12 +23,6 @@
|
||||
#include "init_adapter.h"
|
||||
#include "init_perms.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
#define CAP_NUM 2
|
||||
|
||||
// 240 seconds, 4 minutes
|
||||
@ -181,9 +175,3 @@ void ServiceReap(Service *service)
|
||||
|
||||
service->attribute &= (~SERVICE_ATTR_NEED_RESTART);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
@ -19,12 +19,6 @@
|
||||
#include "init_adapter.h"
|
||||
#include "init_jobs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static const int SLEEP_DURATION = 1;
|
||||
|
||||
// All serivce processes that init will fork+exec.
|
||||
@ -93,9 +87,3 @@ void ReapServiceByPID(int pid)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
@ -19,12 +19,6 @@
|
||||
#include <sys/wait.h>
|
||||
#include "init_service_manager.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static void SigHandler(int sig)
|
||||
{
|
||||
switch (sig) {
|
||||
@ -62,9 +56,3 @@ void SignalInitModule()
|
||||
sigaction(SIGCHLD, &act, NULL);
|
||||
sigaction(SIGTERM, &act, NULL);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
Loading…
x
Reference in New Issue
Block a user