The hal_common_get_transport() returns -ENOENT if it fails to load
backend library, for example, due to the library hasn't been installed
on the image. This might happen as a product image could not fully
supports all the hal backends and this could spam the log. Therefore,
do not print log in this case.
Change-Id: I93be7243999420e864b839ae1bc85f2cdbdc73d5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
int ret = hal_common_get_transport(HAL_MODULE_DEVICE_BATTERY,
&g_hal_transport);
if (ret < 0) {
- _W("Failed to get HAL transport from HAL manifest\n");
+ if (ret != -ENOENT)
+ _W("Failed to get HAL transport from HAL manifest\n");
g_hal_transport = HAL_COMMON_TRANSPORT_PASSTHROUGH;
}
}
int ret = hal_common_get_transport(HAL_MODULE_DEVICE_DISPLAY,
&g_hal_transport);
if (ret < 0) {
- _W("Failed to get HAL transport from HAL manifest\n");
+ if (ret != -ENOENT)
+ _W("Failed to get HAL transport from HAL manifest\n");
g_hal_transport = HAL_COMMON_TRANSPORT_PASSTHROUGH;
}
}
int ret = hal_common_get_transport(HAL_MODULE_DEVICE_LED,
&g_hal_transport);
if (ret < 0) {
- _W("Failed to get HAL transport from HAL manifest\n");
+ if (ret != -ENOENT)
+ _W("Failed to get HAL transport from HAL manifest\n");
g_hal_transport = HAL_COMMON_TRANSPORT_PASSTHROUGH;
}
}