common: Add DEVICE_ERROR_INVALID_PARAMETER handling 30/304130/1
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 10 Jan 2024 10:59:43 +0000 (19:59 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 10 Jan 2024 11:01:44 +0000 (20:01 +0900)
To distinguish DEVICE_ERROR_INVALID_PARAMETER type,
this switch handling code is added to errno_to_device_error().

Change-Id: If78653a863d1ce4daac8aaf1e3923e7c7eae21b3
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/common.h

index 819459c..7a79356 100644 (file)
@@ -49,6 +49,8 @@ static inline int errno_to_device_error(int err)
                return DEVICE_ERROR_RESOURCE_BUSY;
        case -ENOTSUP:
                return DEVICE_ERROR_NOT_SUPPORTED;
+       case -EINVAL:
+               return DEVICE_ERROR_INVALID_PARAMETER;
        default:
                return DEVICE_ERROR_OPERATION_FAILED;
        }