- Remove system error, not called callback, not used function and logs.
- Drops the exclusion reason for Logs
Change-Id: I978869726e64a2c1d14a23e7a871ebd6b67ee0c5
Signed-off-by: pr.jung <pr.jung@samsung.com>
if (ret == -ENOTSUP)
ret = 0;
else if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
*percent = ret;
return DEVICE_ERROR_NONE;
static dd_list *device_cb_list[DEVICE_CALLBACK_MAX];
static int flash_sigid;
+//LCOV_EXCL_START Not called Callback
static void battery_capacity_cb(keynode_t *key, void *data)
{
static device_callback_e type = DEVICE_CALLBACK_BATTERY_CAPACITY;
DD_LIST_FOREACH(device_cb_list[type], elem, cb_info)
cb_info->cb(type, (void*)val, cb_info->data);
}
+//LCOV_EXCL_STOP
+//LCOV_EXCL_START Not called Callback
static void battery_charging_cb(keynode_t *key, void *data)
{
static device_callback_e type = DEVICE_CALLBACK_BATTERY_CHARGING;
DD_LIST_FOREACH(device_cb_list[type], elem, cb_info)
cb_info->cb(type, (void*)val, cb_info->data);
}
+//LCOV_EXCL_STOP
+//LCOV_EXCL_START Not called Callback
static void battery_level_cb(keynode_t *key, void *data)
{
static device_callback_e type = DEVICE_CALLBACK_BATTERY_LEVEL;
DD_LIST_FOREACH(device_cb_list[type], elem, cb_info)
cb_info->cb(type, (void*)status, cb_info->data);
}
+//LCOV_EXCL_STOP
+//LCOV_EXCL_START Not called Callback
static void display_changed_cb(keynode_t *key, void *data)
{
static device_callback_e type = DEVICE_CALLBACK_DISPLAY_STATE;
DD_LIST_FOREACH(device_cb_list[type], elem, cb_info)
cb_info->cb(type, (void*)state, cb_info->data);
}
+//LCOV_EXCL_STOP
+//LCOV_EXCL_START Not called Callback
static void flash_state_cb(GDBusConnection *conn,
const gchar *sender,
const gchar *object,
DD_LIST_FOREACH(device_cb_list[type], elem, cb_info)
cb_info->cb(type, (void*)val, cb_info->data);
}
+//LCOV_EXCL_STOP
static int register_signal(const char *bus_name,
const char *object_path,
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (!conn) {
- _E("fail to get dbus connection : %s", err->message);
- g_clear_error(&err);
+ _E("fail to get dbus connection : %s", err->message); //LCOV_EXCL_LINE
+ g_clear_error(&err); //LCOV_EXCL_LINE System Error
return -EPERM;
}
NULL,
NULL);
if (id == 0) {
- _E("fail to connect %s signal", signal);
+ _E("fail to connect %s signal", signal); //LCOV_EXCL_LINE
return -EPERM;
}
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (!conn) {
- _E("fail to get dbus connection : %s", err->message);
- g_clear_error(&err);
+ _E("fail to get dbus connection : %s", err->message); //LCOV_EXCL_LINE
+ g_clear_error(&err); //LCOV_EXCL_LINE System Error
return -EPERM;
}
return DEVICE_ERROR_NONE;
case -EACCES:
case -EPERM:
- return DEVICE_ERROR_PERMISSION_DENIED;
+ return DEVICE_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE System Error
case -EBUSY:
return DEVICE_ERROR_RESOURCE_BUSY;
case -ENOTSUP:
#define PROC_SCALING_CUR_FREQ "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_cur_freq"
#define PROC_SCALING_MAX_FREQ "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq"
-
+//LCOV_EXCL_START Not used function
int device_cpu_get_count(int *cpu_cnt)
{
FILE *fp;
*max_freq = max;
return DEVICE_ERROR_NONE;
}
+//LCOV_EXCL_STOP Not used function
void *data;
};
+//LCOV_EXCL_START System Error
static int g_dbus_error_to_errno(int code)
{
/**
return -ENOTSUP;
return -ECOMM;
}
+//LCOV_EXCL_STOP
static GVariant *append_g_variant(const char *sig, char *param[])
{
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (!conn) {
+//LCOV_EXCL_START System Error
_E("g_bus_get_sync error : %s-%s (%d-%s)",
interface, method, err->code, err->message);
result = g_dbus_error_to_errno(err->code);
g_clear_error(&err);
return result;
+//LCOV_EXCL_STOP
}
proxy = g_dbus_proxy_new_sync(conn,
NULL, /* GCancellable */
&err);
if (!proxy) {
+//LCOV_EXCL_START System Error
_E("g_dbus_proxy_new_sync error : %s-%s (%d-%s)",
interface, method, err->code, err->message);
result = g_dbus_error_to_errno(err->code);
g_clear_error(&err);
return result;
+//LCOV_EXCL_STOP
}
output = g_dbus_proxy_call_sync(proxy,
NULL, /* GCancellable */
&err);
if (!output) {
+//LCOV_EXCL_START System Error
if (!err) {
_E("g_dbus_proxy_call_sync error : %s-%s",
interface, method);
g_clear_error(&err);
g_object_unref(proxy);
return result;
+//LCOV_EXCL_STOP
}
/* get output value */
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (!conn) {
+//LCOV_EXCL_START System Error
_E("g_bus_get_sync error : %s-%s (%d-%s)",
interface, method, err->code, err->message);
result = g_dbus_error_to_errno(err->code);
g_clear_error(&err);
return result;
+//LCOV_EXCL_STOP
}
proxy = g_dbus_proxy_new_sync(conn,
NULL, /* GCancellable */
&err);
if (!proxy) {
+//LCOV_EXCL_START System Error
_E("g_dbus_proxy_new_sync error : %s-%s (%d-%s)",
interface, method, err->code, err->message);
result = g_dbus_error_to_errno(err->code);
g_clear_error(&err);
return result;
+//LCOV_EXCL_STOP
}
output = g_dbus_proxy_call_sync(proxy,
&err);
if (!output) {
if (!err) {
+//LCOV_EXCL_START System Error
_E("g_dbus_proxy_call_sync error : %s-%s",
interface, method);
g_object_unref(proxy);
g_clear_error(&err);
g_object_unref(proxy);
return result;
+//LCOV_EXCL_STOP
}
g_object_unref(proxy);
res, /* GAsyncResult */
&err);
if (!output)
- _E("g_dbus_proxy_call_finish error : %d-%s",
+ _E("g_dbus_proxy_call_finish error : %d-%s", //LCOV_EXCL_LINE
err->code, err->message);
if (data && data->func)
free(data);
if (err)
+//LCOV_EXCL_START System Error
g_clear_error(&err);
+//LCOV_EXCL_STOP
if (output)
g_variant_unref(output);
g_object_unref(proxy);
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (!conn) {
+//LCOV_EXCL_START System Error
_E("g_bus_get_sync error : %s-%s (%d-%s)",
interface, method, err->code, err->message);
result = g_dbus_error_to_errno(err->code);
g_clear_error(&err);
return result;
+//LCOV_EXCL_STOP
}
proxy = g_dbus_proxy_new_sync(conn,
NULL, /* GCancellable */
&err);
if (!proxy) {
+//LCOV_EXCL_START System Error
_E("g_dbus_proxy_new_sync error : %s-%s (%d-%s)",
interface, method, err->code, err->message);
result = g_dbus_error_to_errno(err->code);
g_clear_error(&err);
return result;
+//LCOV_EXCL_STOP
}
pdata = malloc(sizeof(struct pending_call_data));
if (!pdata) {
- _E("malloc error : %s-%s",
+ _E("malloc error : %s-%s", //LCOV_EXCL_LINE
interface, method);
return -ENOMEM;
}
} \
} while (0)
+//LCOV_EXCL_START
int device_get_display_numbers(int* device_number)
{
return device_display_get_numbers(device_number);
return DEVICE_ERROR_NONE;
}
+//LCOV_EXCL_STOP
if (display_cnt < 0) {
ret = device_display_get_numbers(&display_cnt);
- if (ret != DEVICE_ERROR_NONE)
+ if (ret != DEVICE_ERROR_NONE) //LCOV_EXCL_LINE System Error
return ret;
}
if (display_cnt < 0) {
ret = device_display_get_numbers(&display_cnt);
- if (ret != DEVICE_ERROR_NONE)
+ if (ret != DEVICE_ERROR_NONE) //LCOV_EXCL_LINE System Error
return ret;
}
if (display_cnt < 0) {
ret = device_display_get_numbers(&display_cnt);
- if (ret != DEVICE_ERROR_NONE)
+ if (ret != DEVICE_ERROR_NONE) //LCOV_EXCL_LINE System Error
return ret;
}
if (ret == -ENOTSUP)
ret = 0;
else if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
*device_number = ret;
return DEVICE_ERROR_NONE;
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_OPEN_DEVICE, "i", arr);
if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
*device_handle = (haptic_device_h)ret;
return DEVICE_ERROR_NONE;
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_CLOSE_DEVICE, "u", arr);
if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
return DEVICE_ERROR_NONE;
}
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_VIBRATE_MONOTONE, "uiii", arr);
if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
if (effect_handle)
*effect_handle = (haptic_effect_h)ret;
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_STOP_DEVICE, "u", arr);
if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
return DEVICE_ERROR_NONE;
}
DEVICED_INTERFACE_IR, METHOD_IS_AVAILABLE,
NULL, NULL);
+//LCOV_EXCL_START System Error
if (!ret) {
*available = false;
return DEVICE_ERROR_OPERATION_FAILED;
}
+//LCOV_EXCL_STOP
*available = ir_avail;
return DEVICE_ERROR_NONE;
_E("IR is not supported or IR operation failed");
return ret;
}
- _E("IR is not supported");
+ _E("IR is not supported"); //LCOV_EXCL_LINE
return DEVICE_ERROR_OPERATION_FAILED;
}
if (!pattern)
return DEVICE_ERROR_INVALID_PARAMETER;
if (size <= 0) {
- _E("IR pattern size is invalid");
+ _E("IR pattern size is invalid"); //LCOV_EXCL_LINE
return DEVICE_ERROR_INVALID_PARAMETER;
}
DEVICED_INTERFACE_IR, METHOD_TRANSMIT,
"ai", arr);
+//LCOV_EXCL_START System Error
if (ret < 0)
return DEVICE_ERROR_OPERATION_FAILED;
+//LCOV_EXCL_STOP
return DEVICE_ERROR_NONE;
}
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_GET_MAX_BRIGHTNESS, NULL, NULL);
if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
*max_brightness = ret;
return DEVICE_ERROR_NONE;
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_GET_BRIGHTNESS, NULL, NULL);
if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
*brightness = ret;
return DEVICE_ERROR_NONE;
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_SET_BRIGHTNESS, "ii", arr);
if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
return DEVICE_ERROR_NONE;
}
ret = dbus_method_sync(DEVICED_BUS_NAME,
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_STOP_CUSTOM, NULL, NULL);
+//LCOV_EXCL_START System Error
if (ret < 0)
return errno_to_device_error(ret);
+//LCOV_EXCL_STOP
return DEVICE_ERROR_NONE;
}
[_MI_SHMEM] = "Shmem",
};
+//LCOV_EXCL_START Not used function
static inline int _get_idx(const char *name)
{
int i;
*avail_mem = mi.l[_MI_FREE] + mi.l[_MI_BUF] + mi.l[_MI_CACHED] + mi.l[_MI_SWAP] - mi.l[_MI_SHMEM];
return DEVICE_ERROR_NONE;
}
+//EXCL_LCOV_STOP
int ret;
if (!result) {
- _E("no message : %s", err->message);
+ _E("no message : %s", err->message); //LCOV_EXCL_LINE
return;
}
int ret;
if (!result) {
- _E("no message : %s", err->message);
+ _E("no message : %s", err->message); //LCOV_EXCL_LINE
return;
}
return device_display_change_state(DISPLAY_STATE_NORMAL);
}
+//LCOV_EXCL_START Not available to test(Reboot during TCT)
int device_power_reboot(const char *reason)
{
char *arr[1];
METHOD_REBOOT, "s", arr);
return errno_to_device_error(ret);
}
+//LCOV_EXCL_STOP