battery: suppress config parse error 75/272075/1 accepted/tizen/unified/20220310.120904 submit/tizen/20220308.032646
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 8 Mar 2022 02:44:56 +0000 (11:44 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 8 Mar 2022 02:49:39 +0000 (11:49 +0900)
Do not consider encounter of a section that we are not intersted in
as an error, because several new sections have been added recently.

Change-Id: I9d3f3d6a5dd6e14ca0478ed6f661e39a7519cd46
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/battery/config.c

index 7c5ca10..1595040 100644 (file)
@@ -40,13 +40,13 @@ static int load_config(struct parse_result *result, void *user_data)
        char *name;
        char *value;
 
-       _D("Load config. section=%s name=%s value=%s", result->section, result->name, result->value);
-
        if (!info)
                return -EINVAL;
 
        if (!MATCH(result->section, "BatteryLevelThreshold"))
-               return -EINVAL;
+               return 0;
+
+       _D("Load config. section=%s name=%s value=%s", result->section, result->name, result->value);
 
        name = result->name;
        value = result->value;