pass: parser: Add missing code for PASS_RESROUCE_BATTERY_ID 10/262210/1 accepted/tizen/unified/20210809.061413 submit/tizen/20210809.032652
authorChanwoo Choi <cw00.choi@samsung.com>
Wed, 4 Aug 2021 08:56:27 +0000 (17:56 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 4 Aug 2021 08:56:27 +0000 (17:56 +0900)
When using 'battery' h/w resouce in /hal/etc/pass/pass.conf,
the following error happen. So that add the missing code for PASS_RESROUCE_BATTERY_ID.

[Error log]
pass-parser.c: parse_resource_data(748) > Unknown 'device_type' property value (battery)

Change-Id: I30fb782e4e67b0fbe728201e30e2e4d0a1698c4c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-parser.c

index 9f3f902e50d933074f951b7649bcfc58a4fd000b..fd7f059e5f1c120edfc2a85230757bb1b6111c13 100644 (file)
@@ -742,6 +742,8 @@ static int parse_resource_data(struct pass *pass, int id, json_object *obj)
                config_data->res_type = PASS_RESOURCE_BUS_ID;
        else if (!strncmp(device_type, PASS_RESOURCE_MEMORY_NAME, strlen(device_type)))
                config_data->res_type = PASS_RESOURCE_MEMORY_ID;
+       else if (!strncmp(device_type, PASS_RESOURCE_BATTERY_NAME, strlen(device_type)))
+               config_data->res_type = PASS_RESOURCE_BATTERY_ID;
        else if (!strncmp(device_type, PASS_RESOURCE_NONSTANDARD_NAME, strlen(device_type)))
                config_data->res_type = PASS_RESOURCE_NONSTANDARD_ID;
        else {