GError *error = NULL;
GVariant *reply_var = NULL;
GVariantIter iter;
- GVariant *child = NULL;
+ GVariant *block_device = NULL;
int state = 0;
ms_block_info_s *data = NULL;
g_variant_iter_init(&iter, reply_var);
- while ((child = g_variant_iter_next_value(&iter))) {
- if (g_variant_n_children(child) == 0) {
+ while ((block_device = g_variant_iter_next_value(&iter))) {
+ if (g_variant_n_children(block_device) == 0) {
MS_DBG_INFO("There is no external storage mounted..");
- g_variant_unref(child);
+ g_variant_unref(block_device);
break;
}
- g_variant_get_child(child, 9, "i", &state);
+ g_variant_get_child(block_device, 9, "i", &state);
if (state == 0) {
- g_variant_unref(child);
+ g_variant_unref(block_device);
continue;
}
data = g_new0(ms_block_info_s, 1);
- g_variant_get_child(child, 0, "i", &data->block_type);
- g_variant_get_child(child, 6, "s", &data->mount_uuid);
- g_variant_get_child(child, 8, "s", &data->mount_path);
+ g_variant_get_child(block_device, 0, "i", &data->block_type);
+ g_variant_get_child(block_device, 6, "s", &data->mount_uuid);
+ g_variant_get_child(block_device, 8, "s", &data->mount_path);
data->state = state;
MS_DBG_INFO("block_type : %d", data->block_type);
MS_DBG_INFO("state : %d", data->state);
*dev_list = g_slist_append(*dev_list, data);
- g_variant_unref(child);
+ g_variant_unref(block_device);
}
g_variant_unref(reply_var);
char *mount_path = NULL;
err = usb_device_get_device_list(USB_MASS_STORAGE, &list);
- MS_DBG_RETVM_IF(err != 0, MS_MEDIA_ERR_INTERNAL, "usb_device_get_device_list falied [%d]", err);
+ MS_DBG_RETVM_IF(err != 0, MS_MEDIA_ERR_INTERNAL, "usb_device_get_device_list failed [%d]", err);
count = usb_device_list_get_count(list);
if (count > 0) {