From 3d2476b2c70eaab68d17bf02547b2ab79435c84d Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Wed, 10 Jan 2024 19:59:43 +0900 Subject: [PATCH] common: Add DEVICE_ERROR_INVALID_PARAMETER handling 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 --- src/common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common.h b/src/common.h index 819459c..7a79356 100644 --- a/src/common.h +++ b/src/common.h @@ -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; } -- 2.34.1