mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-24 08:39:46 +00:00
!2033 不开机维测补充修改,开机完成卸载插件
Merge pull request !2033 from mgceshuang/master
This commit is contained in:
commit
38e3115f29
@ -54,6 +54,10 @@ __attribute__((weak)) void RetriggerUeventByPath(int sockFd, char *path)
|
||||
}
|
||||
#endif
|
||||
|
||||
__attribute__((weak)) void InitPostMount(const char *mountPoint, int rc)
|
||||
{
|
||||
}
|
||||
|
||||
bool IsSupportedFilesystem(const char *fsType)
|
||||
{
|
||||
bool supported = false;
|
||||
@ -406,6 +410,7 @@ int MountOneItem(FstabItem *item)
|
||||
}
|
||||
|
||||
int rc = Mount(item->deviceName, item->mountPoint, item->fsType, mountFlags, fsSpecificData);
|
||||
InitPostMount(item->mountPoint, rc);
|
||||
if (rc != 0) {
|
||||
if (FM_MANAGER_NOFAIL_ENABLED(item->fsManagerFlags)) {
|
||||
BEGET_LOGE("Mount no fail device %s to %s failed, err = %d", item->deviceName, item->mountPoint, errno);
|
||||
|
@ -27,7 +27,7 @@ extern "C" {
|
||||
|
||||
enum INIT_BOOTSTAGE {
|
||||
INIT_GLOBAL_INIT = 0,
|
||||
INIT_POST_MOUNT = 3,
|
||||
INIT_FIRST_STAGE = 1,
|
||||
INIT_POST_DATA_UNENCRYPT = 5,
|
||||
INIT_PRE_PARAM_SERVICE = 10,
|
||||
INIT_PRE_PARAM_LOAD = 20,
|
||||
|
@ -28,6 +28,8 @@ int InitModuleMgrInstall(const char *moduleName);
|
||||
|
||||
void InitModuleMgrUnInstall(const char *moduleName);
|
||||
|
||||
void AutorunModuleMgrUnInstall(const char *moduleName);
|
||||
|
||||
void InitModuleMgrDump(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -40,6 +40,11 @@ void InitModuleMgrUnInstall(const char *moduleName)
|
||||
ModuleMgrUninstall(defaultModuleMgr, moduleName);
|
||||
}
|
||||
|
||||
void AutorunModuleMgrUnInstall(const char *moduleName)
|
||||
{
|
||||
ModuleMgrUninstall(autorunModuleMgr, moduleName);
|
||||
}
|
||||
|
||||
static void InitModuleDump(const MODULE_INFO *moduleInfo)
|
||||
{
|
||||
printf("%s\n", moduleInfo->name);
|
||||
|
@ -6,6 +6,7 @@
|
||||
{ "name": "AddCmdExecutor" },
|
||||
{ "name": "RemoveCmdExecutor" },
|
||||
{ "name": "HookMgrAdd" },
|
||||
{ "name": "HookMgrDel" },
|
||||
{ "name": "GetBootStageHookMgr"},
|
||||
{ "name": "InitAddGlobalInitHook" },
|
||||
{ "name": "InitAddPreParamServiceHook" },
|
||||
@ -14,6 +15,7 @@
|
||||
{ "name": "InitAddPostCfgLoadHook" },
|
||||
{ "name": "InitModuleMgrInstall" },
|
||||
{ "name": "InitModuleMgrUnInstall" },
|
||||
{ "name": "AutorunModuleMgrUnInstall" },
|
||||
{ "name": "StartupLog" },
|
||||
{ "name": "DoJobNow" },
|
||||
{ "name": "GetServiceExtData" },
|
||||
|
@ -230,7 +230,7 @@ void SystemPrepare(void)
|
||||
// Make sure init log always output to /dev/kmsg.
|
||||
EnableDevKmsg();
|
||||
INIT_LOGI("Start init first stage.");
|
||||
HookMgrExecute(GetBootStageHookMgr(), INIT_PRE_PARAM_SERVICE, NULL, NULL);
|
||||
HookMgrExecute(GetBootStageHookMgr(), INIT_FIRST_STAGE, NULL, NULL);
|
||||
// Only ohos normal system support
|
||||
// two stages of init.
|
||||
// If we are in updater mode, only one stage of init.
|
||||
|
@ -260,6 +260,7 @@ static void BootEventParaFireByName(const char *paramName)
|
||||
#ifndef STARTUP_INIT_TEST
|
||||
HookMgrExecute(GetBootStageHookMgr(), INIT_BOOT_COMPLETE, NULL, NULL);
|
||||
#endif
|
||||
AutorunModuleMgrUnInstall("init_bootDetector");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user