When apps attempt to open, read or write the device node without permission,
API should return PERIPHERAL_ERROR_PERMISSION_DENIED.
So, add it in CHECK_ERROR macro.
Change-Id: I862da7c08d96fd1506b89834a5721832f7e42ea1
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
return PERIPHERAL_ERROR_TRY_AGAIN; \
if (errno == EINVAL) \
return PERIPHERAL_ERROR_INVALID_PARAMETER; \
+ if (errno == EACCES) \
+ return PERIPHERAL_ERROR_PERMISSION_DENIED; \
char errmsg[MAX_ERR_LEN]; \
strerror_r(errno, errmsg, sizeof(errmsg)); \
_E("Failed the %s(%d) function. errmsg: %s", __FUNCTION__, __LINE__, errmsg); \