mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-27 18:30:52 +00:00
cmdline charger format change
Signed-off-by: wangxutao <wangxutao5@huawei.com>
This commit is contained in:
parent
77c38d3270
commit
2a21b88a8d
@ -104,9 +104,9 @@ void ReadConfig(void)
|
||||
// parse cfg
|
||||
char buffer[32] = {0}; // 32 reason max leb
|
||||
uint32_t len = sizeof(buffer);
|
||||
SystemReadParam("ohos.boot.reboot_reason", buffer, &len);
|
||||
INIT_LOGI("ohos.boot.reboot_reason %s", buffer);
|
||||
if (strcmp(buffer, "poweroff_charge") == 0) {
|
||||
SystemReadParam("ohos.boot.mode", buffer, &len);
|
||||
INIT_LOGI("ohos.boot.mode %s", buffer);
|
||||
if (strcmp(buffer, "charger") == 0) {
|
||||
ParseInitCfg(INIT_CONFIGURATION_FILE, NULL);
|
||||
ReadFileInDir(OTHER_CHARGE_PATH, ".cfg", ParseInitCfg, NULL);
|
||||
} else if (InUpdaterMode() == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user