提交 b7ac7dba 编写于 作者: Y yichengzhao

fix codex

Signed-off-by: Nyichengzhao <yichengzhao1@huawei.com>
Change-Id: I4a81038762a4edf68376959f155fa1c808ec1463
上级 6c61f22f
......@@ -115,7 +115,8 @@ static int DoRebootOther(int id, const char *name, int argc, const char **argv)
const char *cmd = strstr(argv[0], "reboot,");
PLUGIN_CHECK(cmd != NULL, return -1, "Invalid parameter argc %s", argv[0]);
PLUGIN_LOGI("DoRebootOther argv %s", argv[0]);
return syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, cmd + strlen("reboot,"));
return syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
LINUX_REBOOT_CMD_RESTART2, cmd + strlen("reboot,"));
}
static void RebootAdpInit(void)
......
......@@ -299,7 +299,8 @@ static int GetServiceCtrlInfoForPowerCtrl(const char *name, const char *value, S
}
// not found reboot, so reboot by normal
valueOffset = strlen(OHOS_SERVICE_CTRL_PREFIX) + strlen("reboot") + 1;
return CreateCtrlInfo(ctrlInfo, "reboot.other", valueOffset, 1, "%s%s.%s", OHOS_SERVICE_CTRL_PREFIX, "reboot", value);
return CreateCtrlInfo(ctrlInfo, "reboot.other", valueOffset, 1, "%s%s.%s",
OHOS_SERVICE_CTRL_PREFIX, "reboot", value);
}
INIT_LOCAL_API int GetServiceCtrlInfo(const char *name, const char *value, ServiceCtrlInfo **ctrlInfo)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册