util: resource: Change error code from -EPERM to -EACCES 90/280590/1
authorSung-hun Kim <sfoon.kim@samsung.com>
Thu, 1 Sep 2022 05:02:05 +0000 (14:02 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Thu, 1 Sep 2022 05:22:12 +0000 (14:22 +0900)
To match Tizen error code, I changed -EPERM to -EACCES.
Which corresponds to TIZEN_ERROR_PERMISSION_DENIED.

Change-Id: I1d3675435eba319637710c4cef3981398e7ab96a
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
src/util/resource.c

index 46a8e040025ef5f75911e3a4777a2e36e433f456..cfb9e941e0c5f52670247f9bb75685760c412864 100644 (file)
@@ -984,7 +984,7 @@ int set_resource_attr_interest(struct resource *resource, u_int64_t interest_mas
                if (!is_resource_attr_visible(resource, &resource->attrs[i])) {
                        _E("res:name(%s) does not have enough privilege to read the attr:name(%s)",
                                        resource->name, resource->attrs[i].name);
-                       ret = -EPERM;
+                       ret = -EACCES;
                        goto err;
                }