修复L1设备重启失败问题

Signed-off-by: zhongning5 <zhongning5@huawei.com>
Change-Id: I8fd8afff548d9dfc376f3aedfd85d85bc275a0cd
This commit is contained in:
zhongning5 2024-08-08 18:37:23 +08:00
parent 051e3dfc43
commit 3740c8fcfe
2 changed files with 5 additions and 2 deletions

View File

@ -44,9 +44,12 @@ static int LoadOnePersistParam_(const uint32_t *context, const char *name, const
return WriteParam(name, value, &dataIndex, mode);
}
if (strcmp(persetValue, value) != 0) {
if ((strcmp(persetValue, value) != 0)) {
PARAM_LOGI("%s value is different, preset value is:%s, persist value is:%s", name, persetValue, value);
mode |= LOAD_PARAM_PERSIST;
return WriteParam(name, value, &dataIndex, mode);
}
return 0;
}

View File

@ -56,7 +56,7 @@ extern "C" {
#define PARAM_NEED_CHECK_IN_SERVICE 0x2
#define PARAM_CTRL_SERVICE 0x1
#ifndef
#ifndef OHOS_LITE
#define PERSIST_PARAM_FIXED_FLAGS "/data/service/el1/startup/persist_param_fixed"
#else
#define PERSIST_PARAM_FIXED_FLAGS "/storage/data/system/param/persist_param_fixed"