int ret_val;
if (!buf) {
- _E("input param error"); //LCOV_EXCL_LINE
+ _E("input param error");
return STORAGE_ERROR_INVALID_PARAMETER;
}
snprintf(ext_path, sizeof(ext_path), "%s", path);
else {
if (!storage_ext_is_supported()) {
- _D("Block module is not enabled");
- return STORAGE_ERROR_NOT_SUPPORTED;
+ _D("Block module is not enabled"); //LCOV_EXCL_LINE
+ return STORAGE_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
ret_val = get_external_path(ext_path, sizeof(ext_path));
if (ret_val == -ENODEV)
snprintf(ext_path, sizeof(ext_path), "%s", path);
else {
if (!storage_ext_is_supported()) {
- _D("Block module is not enabled");
- return STORAGE_ERROR_NOT_SUPPORTED;
+ _D("Block module is not enabled"); //LCOV_EXCL_LINE
+ return STORAGE_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
ret_val = get_external_path(ext_path, sizeof(ext_path));
if (ret_val == -ENODEV)
goto out_nodev;
if (ret_val < 0) {
- _E("Failed to get external path(%d)", ret_val);
+ _E("Failed to get external path(%d)", ret_val); //LCOV_EXCL_LINE
return STORAGE_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
}
if (ret_dbus < 0) {
_E("Failed to get storage_ext device info"); //LCOV_EXCL_LINE
- return -EIO;
+ return -EIO; //LCOV_EXCL_LINE
}
if (!g_variant_get_safe(reply, "(a(issssssisibii))", &iter)) {
+ //LCOV_EXCL_START Dbus type error
_E("Failed to get params from gvariant.");
g_variant_unref(reply);
return -EIO;
+ //LCOV_EXCL_STOP
}
while (g_variant_iter_loop(iter, "(issssssisibii)",
elem = (storage_ext_device *)malloc(sizeof(storage_ext_device));
if (!elem) {
- _E("malloc() failed"); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START System error
+ _E("malloc() failed");
ret = -ENOMEM;
goto out;
+ //LCOV_EXCL_STOP
}
elem->type = info.type;
if (ret_dbus < 0) {
_E("Failed to get storage_ext device info"); //LCOV_EXCL_LINE
- return -EIO;
+ return -EIO; //LCOV_EXCL_LINE
}
if (!g_variant_get_safe(reply, "(ttttttttttt)",
if (ret_dbus < 0) {
_E("Failed to get storage_ext device info"); //LCOV_EXCL_LINE
- return -EIO;
+ return -EIO; //LCOV_EXCL_LINE
}
if (!g_variant_get_safe(reply, "(ttttttttttt)",
&(buf->f_bfree), &(buf->f_bavail), &(buf->f_files),
&(buf->f_ffree), &(buf->f_favail), &(buf->f_fsid),
&(buf->f_flag), &(buf->f_namemax))) {
+ //LCOV_EXCL_START Dbus type error
_E("Failed to get params from gvariant.");
g_variant_unref(reply);
return -EIO;
+ //LCOV_EXCL_STOP
}
// %lu buf->f_bsize, buf->f_frsize, buf->f_fsid, buf->f_flag, buf->f_namemax
gdbus_free_connection(dbus_handle);
if (ret_dbus < 0) {
+ //LCOV_EXCL_START Dbus error
_E("Failed to get %d level", id);
return -EIO;
+ //LCOV_EXCL_STOP
}
if (!g_variant_get_safe(reply, "(s)", &reply_val)) {
+ //LCOV_EXCL_START Dbus type error
_E("Failed to get params from gvariant.");
g_variant_unref(reply);
return -EIO;
+ //LCOV_EXCL_STOP
}
*level = strdup(reply_val);
g_variant_unref(reply);
if (*level == NULL)
- return -ENOMEM;
+ return -ENOMEM; //LCOV_EXCL_LINE
return 0;
}
if (ret_dbus < 0) {
_E("There is no storage with the storage id (%d)", storage_id); //LCOV_EXCL_LINE
- return -ENODEV;
+ return -ENODEV; //LCOV_EXCL_LINE
}
if (!g_variant_get_safe(reply, "(issssssisibii)",
&info->readonly, &info->mount_point,
&info->state, &info->primary,
&info->flags, &info->storage_id)) {
- _E("No storage with the storage id (%d)", storage_id); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START Dbus error
+ _E("No storage with the storage id (%d)", storage_id);
ret_dbus = -ENODEV;
goto out;
+ //LCOV_EXCL_STOP
}
if (info->storage_id < 0) {
- _E("No storage with the storage id (%d)", storage_id); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START Dbus error
+ _E("No storage with the storage id (%d)", storage_id);
ret_dbus = -ENODEV;
goto out;
+ //LCOV_EXCL_STOP
}
out:
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) {
dbus_handle_h dbus_handle = gdbus_get_connection(G_BUS_TYPE_SYSTEM, true);
if (dbus_handle == NULL) {
+ //LCOV_EXCL_START Dbus error
_E("Failed to get dbus connection");
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
ret_dbus = gdbus_priv_call_sync_with_reply(dbus_handle,
NULL, &reply_mount_point,
NULL, NULL,
NULL, &reply_id)) {
+ //LCOV_EXCL_START Dbus error
g_variant_unref(reply);
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
g_variant_unref(reply);
*path = strdup(reply_mount_point);
if (*path == NULL) {
ret = STORAGE_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE System Error
- goto out;
+ goto out; //LCOV_EXCL_LINE System Error
}
*storage_id = reply_id;
return ret;
}
+//LCOV_EXCL_START Internal API
API int storage_get_storage_level(const char *path, char **level)
{
int ret_level;
return STORAGE_ERROR_NONE;
}
+//LCOV_EXCL_STOP Internal API
//LCOV_EXCL_START Not called callback
static void mount_mmc_cb(GVariant *var, void *user_data, GError *err)
}
//LCOV_EXCL_STOP
+//LCOV_EXCL_START Internal API
API int storage_request_mount_mmc(struct mmc_contents *mmc_data)
{
void (*mount_cb)(GVariant *, void *, GError *) = NULL;
ret_val = storage_get_primary_sdcard(&id, &path);
if (ret_val != STORAGE_ERROR_NONE)
return ret_val;
-//LCOV_EXCL_START System Error
if (path)
free(path);
-//LCOV_EXCL_STOP
ret_val = gdbus_call_async_with_reply(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_MANAGER,
return STORAGE_ERROR_NONE;
}
+//LCOV_EXCL_STOP Internal API
//LCOV_EXCL_START Not called callback
static void unmount_mmc_cb(GVariant *var, void *user_data, GError *err)
}
//LCOV_EXCL_STOP
+//LCOV_EXCL_START Internal API
API int storage_request_unmount_mmc(struct mmc_contents *mmc_data, int option)
{
void (*unmount_cb)(GVariant *, void *, GError *) = NULL;
ret_val = storage_get_primary_sdcard(&id, &path);
if (ret_val != STORAGE_ERROR_NONE)
return ret_val;
-//LCOV_EXCL_START System Error
if (path)
free(path);
-//LCOV_EXCL_STOP
ret_val = gdbus_call_async_with_reply(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_MANAGER,
return STORAGE_ERROR_NONE;
}
+//LCOV_EXCL_STOP
//LCOV_EXCL_START Not called callback
static void format_mmc_cb(GVariant *var, void *user_data, GError *err)
}
//LCOV_EXCL_STOP
+//LCOV_EXCL_START Internal API
API int storage_request_format_mmc(struct mmc_contents *mmc_data)
{
return storage_format_mmc(mmc_data, 1);
}
+//LCOV_EXCL_STOP
+//LCOV_EXCL_START Internal API
API int storage_format_mmc(struct mmc_contents *mmc_data, int option)
{
void (*format_cb)(GVariant *, void *, GError *) = NULL;
ret_val = storage_get_primary_sdcard(&id, &path);
if (ret_val != STORAGE_ERROR_NONE)
return ret_val;
-//LCOV_EXCL_START System Error
if (path)
free(path);
-//LCOV_EXCL_STOP
ret_val = gdbus_call_async_with_reply(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_MANAGER,
return STORAGE_ERROR_NONE;
}
+//LCOV_EXCL_STOP
+//LCOV_EXCL_START Internal API
API int storage_is_mounted_opt_usr(storage_part_mount_e *mounted)
{
blkid_cache cache = NULL;
return STORAGE_ERROR_NONE;
}
+//LCOV_EXCL_STOP
}
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
ret_val = storage_ext_foreach_device_list(callback, user_data);
if (ret_val < 0) {
_E("Failed to iterate external devices (%d)", ret_val); //LCOV_EXCL_LINE
- return STORAGE_ERROR_OPERATION_FAILED;
+ return STORAGE_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
return STORAGE_ERROR_NONE;
/* external storage */
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
ret_val = storage_ext_get_root(storage_id, root, sizeof(root), &extendedint);
if (ret_val < 0) {
- _E("Failed to get root path of external storage(%d, %d", storage_id, ret_val); //LCOV_EXCL_LINE
+ _E("Failed to get root path of external storage(%d, %d", storage_id, ret_val);
if (ret_val == -ENODEV || ret_val == -EINVAL)
return STORAGE_ERROR_INVALID_PARAMETER;
+ //LCOV_EXCL_START
else if (ret_val == -ENOMEM)
return STORAGE_ERROR_OUT_OF_MEMORY;
else
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
*path = strdup(root);
if (!*path) {
- _E("Failed to copy the root string : %d", errno); //LCOV_EXCL_LINE System Error
+ //LCOV_EXCL_START System error
+ _E("Failed to copy the root string : %d", errno);
return STORAGE_ERROR_OUT_OF_MEMORY;
+ //LCOV_EXCL_STOP
}
return STORAGE_ERROR_NONE;
free(temp2);
} else {
if ((ret_val = snprintf(temp, PATH_MAX, "%s/%s", root, dir_path[type])) > PATH_MAX - 1) {
+ //LCOV_EXCL_START
_E("Path is longer than buffer. Need %d size of buffer.", ret_val + 1);
return STORAGE_ERROR_OUT_OF_MEMORY;
+ //LCOV_EXCL_STOP
}
}
/* external storage */
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
if (type == STORAGE_DIRECTORY_SYSTEM_RINGTONES) {
- _E("Not support directory : id(%d) type(%d)", storage_id, type); //LCOV_EXCL_LINE
+ _E("Not support directory : id(%d) type(%d)", storage_id, type);
return STORAGE_ERROR_INVALID_PARAMETER;
}
ret_val = storage_ext_get_root(storage_id, root, sizeof(root), &extendedint);
if (ret_val < 0) {
- _E("Failed to get root dir for external storage(id:%d, ret:%d)", storage_id, ret_val); //LCOV_EXCL_LINE
+ _E("Failed to get root dir for external storage(id:%d, ret:%d)", storage_id, ret_val);
if (ret_val == -ENODEV || ret_val == -EINVAL)
return STORAGE_ERROR_INVALID_PARAMETER;
+ //LCOV_EXCL_START
else if (ret_val == -ENOMEM)
return STORAGE_ERROR_OUT_OF_MEMORY;
else
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
/* The operation is not decided */
if (extendedint)
return STORAGE_ERROR_INVALID_PARAMETER;
if ((ret_val = snprintf(temp, sizeof(temp), "%s/%s", root, dir_path[type])) > sizeof(temp) - 1) {
+ //LCOV_EXCL_START
_E("Path is longer than buffer. Need %d size of buffer.", ret_val + 1);
return STORAGE_ERROR_OUT_OF_MEMORY;
+ //LCOV_EXCL_STOP
}
out:
*path = strdup(temp);
if (!*path) {
- _E("Failed to copy the directory(%d) string : %d", type, errno); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START System error
+ _E("Failed to copy the directory(%d) string : %d", type, errno);
return STORAGE_ERROR_OUT_OF_MEMORY;
+ //LCOV_EXCL_STOP
}
return STORAGE_ERROR_NONE;
/* external storage */
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
ret_val = storage_ext_get_root(storage_id, root, sizeof(root), &extendedint);
_E("Failed to get type of external storage");
if (ret_val == -ENODEV || ret_val == -EINVAL)
return STORAGE_ERROR_INVALID_PARAMETER;
+ //LCOV_EXCL_START
else if (ret_val == -ENOMEM)
return STORAGE_ERROR_OUT_OF_MEMORY;
else
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
if (extendedint)
*type = STORAGE_TYPE_EXTENDED_INTERNAL;
/* external storage */
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
ret_val = storage_ext_get_state(storage_id, &st);
if (ret_val < 0) {
- _E("Failed to get state (storage id(%d), ret_val(%d))", storage_id, ret_val); //LCOV_EXCL_LINE
+ _E("Failed to get state (storage id(%d), ret_val(%d))", storage_id, ret_val);
if (ret_val == -ENODEV || ret_val == -EINVAL)
return STORAGE_ERROR_INVALID_PARAMETER;
+ //LCOV_EXCL_START
else if (ret_val == -ENOMEM)
return STORAGE_ERROR_OUT_OF_MEMORY;
else
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
*state = st;
/* For backward compatability */
if (storage_id == STORAGE_TYPE_EXTERNAL) {
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
if (!compat_cb_init) {
/* external storage */
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
info.id = storage_id;
ret = storage_ext_register_cb(STORAGE_CALLBACK_ID, &info);
if (ret < 0) {
- _E("Failed to register callback : id(%d)", storage_id); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ _E("Failed to register callback : id(%d)", storage_id);
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
return STORAGE_ERROR_NONE;
/* For backward compatability */
if (storage_id == STORAGE_TYPE_EXTERNAL) {
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
GList *elem_n;
/* external storage */
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
info.id = storage_id;
ret_val = storage_ext_unregister_cb(STORAGE_CALLBACK_ID, &info);
if (ret_val < 0) {
- _E("Failed to unregister callback : id(%d)", storage_id); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ _E("Failed to unregister callback : id(%d)", storage_id);
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
return STORAGE_ERROR_NONE;
/* external storage */
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
ret_val = storage_ext_get_space(storage_id, &total, NULL);
out:
if (ret_val < 0) {
- _E("Failed to get total memory : id(%d)", storage_id); //LCOV_EXCL_LINE
+ _E("Failed to get total memory : id(%d)", storage_id);
if (ret_val == -ENODEV || ret_val == -EINVAL)
return STORAGE_ERROR_INVALID_PARAMETER;
+ //LCOV_EXCL_START
else if (ret_val == -ENOMEM)
return STORAGE_ERROR_OUT_OF_MEMORY;
else
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
*bytes = total;
/* external storage */
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
ret_val = storage_ext_get_space(storage_id, NULL, &avail);
out:
if (ret_val < 0) {
- _E("Failed to get available memory : id(%d)", storage_id); //LCOV_EXCL_LINE
+ _E("Failed to get available memory : id(%d)", storage_id);
if (ret_val == -ENODEV || ret_val == -EINVAL)
return STORAGE_ERROR_INVALID_PARAMETER;
+ //LCOV_EXCL_START
else if (ret_val == -ENOMEM)
return STORAGE_ERROR_OUT_OF_MEMORY;
else
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
*bytes = avail;
}
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_E("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
/* external storage */
ret_val = storage_ext_register_cb(STORAGE_CALLBACK_TYPE, &info);
if (ret_val < 0) {
- _E("Failed to register storage callback(ret:%d)", ret_val); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ _E("Failed to register storage callback(ret:%d)", ret_val);
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
return STORAGE_ERROR_NONE;
}
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_E("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
/* external storage */
ret_val = storage_ext_unregister_cb(STORAGE_CALLBACK_TYPE, &info);
if (ret_val < 0) {
- _E("Failed to unregister storage callback(ret:%d)", ret_val); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ _E("Failed to unregister storage callback(ret:%d)", ret_val);
return STORAGE_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
return STORAGE_ERROR_NONE;
ret = storage_get_type(storage_id, type);
if (ret != STORAGE_ERROR_NONE) {
+ //LCOV_EXCL_START
_E("Failed to get storage type: %d", ret);
return ret;
+ //LCOV_EXCL_STOP
}
if (*type == STORAGE_TYPE_INTERNAL || *type == STORAGE_TYPE_EXTENDED_INTERNAL)
return STORAGE_ERROR_INVALID_PARAMETER;
if (!storage_ext_is_supported()) {
+ //LCOV_EXCL_START
_D("Block module is not enabled");
return STORAGE_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
ext_dev = calloc(1, sizeof(storage_ext_device));
ret = STORAGE_ERROR_INVALID_PARAMETER;
goto out;
}
+ //LCOV_EXCL_START
ret = STORAGE_ERROR_OPERATION_FAILED;
goto out;
+ //LCOV_EXCL_STOP
}
if (ext_dev->type == STORAGE_EXT_SCSI)