pass: parser: Parse new resource type for display/disk/network 90/278690/2
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 22 Jul 2022 04:59:21 +0000 (13:59 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 27 Jul 2022 08:26:18 +0000 (17:26 +0900)
Parse new resource type for display/disk/network.

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

index d268050..0c6d4d3 100644 (file)
@@ -866,6 +866,12 @@ static int parse_resource_data(struct pass *pass, int id, json_object *obj)
                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_DISPLAY_NAME, strlen(device_type)))
+               config_data->res_type = PASS_RESOURCE_DISPLAY_ID;
+       else if (!strncmp(device_type, PASS_RESOURCE_DISK_NAME, strlen(device_type)))
+               config_data->res_type = PASS_RESOURCE_DISK_ID;
+       else if (!strncmp(device_type, PASS_RESOURCE_NETWORK_NAME, strlen(device_type)))
+               config_data->res_type = PASS_RESOURCE_NETWORK_ID;
        else if (!strncmp(device_type, PASS_RESOURCE_NONSTANDARD_NAME, strlen(device_type)))
                config_data->res_type = PASS_RESOURCE_NONSTANDARD_ID;
        else {