未验证 提交 b06f4f82 编写于 作者: O openharmony_ci 提交者: Gitee

!2171 Feature: add file_migrate_ability interface

Merge pull request !2171 from fengjiahui4/master
......@@ -28,6 +28,8 @@ extern "C" {
enum INIT_BOOTSTAGE {
INIT_GLOBAL_INIT = 0,
INIT_FIRST_STAGE = 1,
INIT_MOUNT_STAGE = 3,
INIT_RESTORECON = 4,
INIT_POST_DATA_UNENCRYPT = 5,
INIT_PRE_PARAM_SERVICE = 10,
INIT_PRE_PARAM_LOAD = 20,
......
......@@ -295,6 +295,7 @@ static void DoMountFstabFile(const struct CmdArgs *ctx)
INIT_LOGI("Mount partitions from fstab file \" %s \"", ctx->argv[0]);
int ret = MountAllWithFstabFile(ctx->argv[0], 0);
INIT_LOGI("Mount partitions from fstab file \" %s \" finish ret %d", ctx->argv[0], ret);
HookMgrExecute(GetBootStageHookMgr(), INIT_MOUNT_STAGE, NULL, NULL);
}
static void DoUmountFstabFile(const struct CmdArgs *ctx)
......@@ -310,6 +311,20 @@ static void DoUmountFstabFile(const struct CmdArgs *ctx)
static void DoRestorecon(const struct CmdArgs *ctx)
{
int ret;
INIT_CMD_INFO cmdInfo;
cmdInfo.cmdName = "restorecon";
cmdInfo.cmdContent = ctx->argv[0];
cmdInfo.reserved = NULL;
HOOK_EXEC_OPTIONS options;
options.flags = TRAVERSE_STOP_WHEN_ERROR;
options.preHook = NULL;
options.postHook = NULL;
ret = HookMgrExecute(GetBootStageHookMgr(), INIT_RESTORECON, (void*)(&cmdInfo), (void*)(&options));
if (ret == 0) {
return;
}
PluginExecCmdByName("restoreContentRecurse", ctx->argv[0]);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册