From b7ac7dba10e96fbac2e6b08413ba5b10e2760e0b Mon Sep 17 00:00:00 2001 From: yichengzhao Date: Fri, 25 Nov 2022 10:52:49 +0800 Subject: [PATCH] fix codex Signed-off-by: yichengzhao Change-Id: I4a81038762a4edf68376959f155fa1c808ec1463 --- services/modules/reboot/reboot.c | 3 ++- services/param/manager/param_manager.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/services/modules/reboot/reboot.c b/services/modules/reboot/reboot.c index 49939c4f..874b4369 100644 --- a/services/modules/reboot/reboot.c +++ b/services/modules/reboot/reboot.c @@ -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) diff --git a/services/param/manager/param_manager.c b/services/param/manager/param_manager.c index bd765eb4..dba601ab 100644 --- a/services/param/manager/param_manager.c +++ b/services/param/manager/param_manager.c @@ -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) -- GitLab