return NULL;
}
+//LCOV_EXCL_START Not called Callback
static void on_name_vanished(GDBusConnection *connection,
const gchar *name,
gpointer user_data)
}
pthread_mutex_unlock(&dmutex);
}
+//LCOV_EXCL_STOP
static GDBusConnection *get_dbus_connection(void)
{
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (!conn) {
+ //LCOV_EXCL_START System Error
if (err)
_D("Fail to get dbus connection: %s", err->message);
else
_D("Fail to get dbus connection");
return NULL;
+ //LCOV_EXCL_STOP
}
return conn;
node = malloc(sizeof(struct proxy_node));
if (!node) {
+ //LCOV_EXCL_START System Error
g_object_unref(proxy);
if (err)
g_set_error(err, G_IO_ERROR,
G_IO_ERROR_FAILED,
"Cannot allocate proxy_node memory");
return NULL;
+ //LCOV_EXCL_STOP
}
node->proxy = proxy;
pthread_mutex_unlock(&dmutex);
if (!output) {
+ //LCOV_EXCL_START System Error
if (err) {
_E("g_dbus_proxy_call_sync error : %s-%s (%d-%s)",
interface, method, err->code, err->message);
result = -ECOMM;
}
return result;
+ //LCOV_EXCL_STOP
}
/* get output value */
return result;
}
+//LCOV_EXCL_START Not called Callback
static void feedback_signal_callback(GDBusConnection *conn,
const gchar *sender,
const gchar *path,
_E("Failed to call restart callback");
}
}
+//LCOV_EXCL_STOP
int register_signal_handler(feedback_restart_cb func)
{
NULL,
NULL);
if (feedback_id == 0) {
+//LCOV_EXCL_START System Error
free(callback);
_E("Failed to subscrive bus signal");
return -EPERM;
+//LCOV_EXCL_STOP
}
callback->func = func;
DD_LIST_APPEND(dev_head, (struct device_ops*)dev);
}
+//LCOV_EXCL_START System Error
void remove_device(const struct device_ops *dev)
{
DD_LIST_REMOVE(dev_head, (struct device_ops*)dev);
}
+//LCOV_EXCL_STOP
const struct device_ops *find_device(int type)
{
static unsigned int init_cnt;
static pthread_mutex_t fmutex = PTHREAD_MUTEX_INITIALIZER;
+//LCOV_EXCL_START Not called Callback
static int restart_callback()
{
const struct device_ops *dev;
dev->init();
return 0;
}
+//LCOV_EXCL_STOP
API int feedback_initialize(void)
{
if (!profile) {
_E("there is no valid profile module."); //LCOV_EXCL_LINE
pthread_mutex_unlock(&fmutex);
- return FEEDBACK_ERROR_NOT_SUPPORTED;
+ return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE System Error
}
if (init_cnt++ > 0) {
ret = register_signal_handler(restart_callback);
if (ret < 0)
- _E("Fail to register signal handler: %d", ret);
+ _E("Fail to register signal handler: %d", ret); //LCOV_EXCL_LINE System Error
/* initialize device */
devices_init();
ret = unregister_signal_handler(restart_callback);
if (ret < 0)
- _E("Fail to unregister signal handler: %d", ret);
+ _E("Fail to unregister signal handler: %d", ret); //LCOV_EXCL_LINE System Error
/* deinitialize device */
devices_exit();
int level;
if ((int)v_handle <= 0) {
- if (v_handle == 0) {
+ if (v_handle == 0) { //LCOV_EXCL_LINE System Error
_E("Not initialized"); //LCOV_EXCL_LINE
- return -ENOENT;
+ return -ENOENT; //LCOV_EXCL_LINE System Error
}
_E("Not supported vibration"); //LCOV_EXCL_LINE
return v_handle; //LCOV_EXCL_LINE System Error
int ret;
if ((int)v_handle <= 0) {
- if (v_handle == 0) {
+ if (v_handle == 0) { //LCOV_EXCL_LINE System Error
_E("Not initialized"); //LCOV_EXCL_LINE
- return -ENOENT;
+ return -ENOENT; //LCOV_EXCL_LINE System Error
}
_E("Not supported vibration"); //LCOV_EXCL_LINE
return v_handle; //LCOV_EXCL_LINE System Error
}
if ((int)v_handle <= 0) {
- if (v_handle == 0) {
+ if (v_handle == 0) { //LCOV_EXCL_LINE System Error
_E("Not initialized"); //LCOV_EXCL_LINE
- return -ENOENT;
+ return -ENOENT; //LCOV_EXCL_LINE System Error
}
_E("Not supported vibration"); //LCOV_EXCL_LINE
*supported = false; //LCOV_EXCL_LINE System Error
return 0;
}
+//LCOV_EXCL_START Not Supported Feature
static int vibrator_get_path(feedback_pattern_e pattern, char *buf, unsigned int buflen)
{
return 0;
{
return 0;
}
+//LCOV_EXCL_STOP
static const struct device_ops vibrator_device_ops = {
.type = FEEDBACK_TYPE_VIBRATION,