From: Youngjae Cho Date: Tue, 8 Mar 2022 02:44:56 +0000 (+0900) Subject: battery: suppress config parse error X-Git-Tag: accepted/tizen/unified/20220310.120904^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e021542a3270c05d42d1c9b0bca2f0f183344003;p=platform%2Fcore%2Fsystem%2Fdeviced.git battery: suppress config parse error 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 --- diff --git a/src/battery/config.c b/src/battery/config.c index 7c5ca10..1595040 100644 --- a/src/battery/config.c +++ b/src/battery/config.c @@ -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;