Plugin api has changed to return negative error value in three ways.
1. -ENOTSUP
: Fail to load plugin backend.
2. -EOPNOTSUPP
: Successfully loaded plugin backend, but there is no implementation
of requested interface.
3. The other negative values
: Successfully loaded plugin backend, and successfully invoked
implemented interface, but the implementation itself returned
a negative value. In this case, it is strongly discouraged
that implementation returning -ENOTSUP or -EOPNOTSUPP as it
cannot be distinguished from the above two cases.
Change-Id: I754c06a813c7c4587c07bc285677fdc1a99cbc80
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
if (!funcs) {
ret = syscommon_plugin_deviced_battery_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
if (!funcs || !funcs->is_possible_to_notify_battery_full) {
_E("No backend or no \"is_possible_to_notify_battery_full\" function");
- return -ENOTSUP;
+ return -EOPNOTSUPP;
}
*possible_notify = funcs->is_possible_to_notify_battery_full();
+
return 0;
}
if (!funcs) {
ret = syscommon_plugin_deviced_battery_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
if (!funcs || !funcs->update_health_ovp_state) {
_E("No backend or no \"update_battery_health_ovp_state\" function");
- return -ENOTSUP;
+ return -EOPNOTSUPP;
}
funcs->update_health_ovp_state(noti_status);
+
return 0;
}
\ No newline at end of file
if (!g_display_funcs) {
ret = syscommon_plugin_deviced_display_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
assert(g_display_funcs);
+ if (!g_display_funcs->load_display_config)
+ return -EOPNOTSUPP;
+
return g_display_funcs->load_display_config(data);
}
if (!g_display_funcs) {
ret = syscommon_plugin_deviced_display_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
assert(g_display_funcs);
if (!g_display_funcs) {
ret = syscommon_plugin_deviced_display_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
assert(g_display_funcs);
if (!g_display_funcs) {
ret = syscommon_plugin_deviced_display_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
assert(g_display_funcs);
if (!g_display_funcs) {
ret = syscommon_plugin_deviced_display_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
assert(g_display_funcs);
if (!g_display_funcs) {
ret = syscommon_plugin_deviced_display_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
assert(g_display_funcs);
if (!g_display_funcs) {
ret = syscommon_plugin_deviced_display_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
assert(g_display_funcs);
if (!g_display_funcs) {
ret = syscommon_plugin_deviced_display_get_backend();
if (ret < 0)
- return ret;
+ return -ENOTSUP;
}
assert(g_display_funcs);