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