ret = storage_ext_get_device_info(storage_id, dev);
if (ret < 0) {
_E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret); //LCOV_EXCL_LINE
- goto out;
+ goto out; //LCOV_EXCL_LINE
}
ret = storage_ext_get_dev_state(dev, STORAGE_EXT_CHANGED, &state);
if (ret < 0) {
_E("Failed to get state of storage (id:%d, ret:%d)", storage_id, ret); //LCOV_EXCL_LINE
- goto out;
+ goto out; //LCOV_EXCL_LINE
}
if (state >= STORAGE_STATE_MOUNTED) {
#endif
if (ret < 0) {
_E("Failed to get external memory size of (%s)(ret:%d)", dev->mount_point, ret); //LCOV_EXCL_LINE
- goto out;
+ goto out; //LCOV_EXCL_LINE
}
t = (unsigned long long)s.f_frsize*s.f_blocks;
ret_val = storage_ext_get_list(&list);
if (ret_val < 0) {
_E("Failed to get external storage list from deviced (%d)", errno); //LCOV_EXCL_LINE
- return ret_val;
+ return ret_val; //LCOV_EXCL_LINE
}
SYS_G_LIST_FOREACH(list, elem, dev) {
ret_val = storage_ext_get_dev_state(dev, STORAGE_EXT_CHANGED, &state);
if (ret_val < 0) {
_E("Failed to get storage state (devnode:%s, ret_val:%d)", dev->devnode, ret_val); //LCOV_EXCL_LINE
- continue;
+ continue; //LCOV_EXCL_LINE
}
if (dev->type == STORAGE_EXT_MMC_EXTENDED_INTERNAL)
/* add device changed callback to list (local) */
cb_info = malloc(sizeof(struct storage_cb_info));
if (!cb_info)
- return -errno;
+ return -errno; //LCOV_EXCL_LINE
memcpy(cb_info, info, sizeof(struct storage_cb_info));
SYS_G_LIST_APPEND(cb_list[type], cb_info);
}
if (!check_if_callback_exist(type, info, &cb_info)) {
+ //LCOV_EXCL_START Callbacked is not registered case
_E("The callback is not registered");
return 0;
+ //LCOV_EXCL_STOP
}
/* remove device callback from list (local) */
if (access(file_name, R_OK) == 0) {
fp = fopen(file_name, "r");
if (!fp) {
- _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START File operation error
+ _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret);
ret = -ENODEV;
goto out;
+ //LCOV_EXCL_STOP
}
tmp = fgets(path, len, fp);
fclose(fp);
if (!tmp) {
+ //LCOV_EXCL_START File operation error
ret = -ENODEV;
_D("Failed to get path");
goto out;
+ //LCOV_EXCL_STOP
}
*extendedinternal = false;
} else if (access(file_name2, R_OK) == 0) {
fp = fopen(file_name2, "r");
if (!fp) {
- _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START File operation error
+ _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret);
ret = -ENODEV;
goto out;
+ //LCOV_EXCL_STOP
}
tmp = fgets(path, len, fp);
fclose(fp);
if (!tmp) {
+ //LCOV_EXCL_START File operation error
ret = -ENODEV;
_D("Failed to get path");
goto out;
+ //LCOV_EXCL_STOP
}
*extendedinternal = true;
} else {
ret = storage_ext_get_device_info(storage_id, dev);
if (ret < 0) {
- _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret);
storage_ext_release_device(&dev);
goto out;
+ //LCOV_EXCL_STOP
}
snprintf(path, len, "%s", dev->mount_point);
ret = storage_ext_get_device_info(storage_id, dev);
if (ret < 0) {
- _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret);
goto out;
+ //LCOV_EXCL_STOP
}
ret = storage_ext_get_dev_state(dev, STORAGE_EXT_CHANGED, state);
ret = storage_ext_get_list(&list);
if (ret < 0) {
- _E("Failed to get external storage list from deviced (%d)", errno); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ _E("Failed to get external storage list from deviced (%d)", errno);
return ret;
+ //LCOV_EXCL_STOP
}
SYS_G_LIST_FOREACH(list, elem, dev) {