summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2012-10-13 14:11:08 -0700
committerPhilip Langdale <philipl@overt.org>2013-01-11 20:30:47 -0800
commit1751084b681cc6294b250880ef33d89d11ac50e3 (patch)
tree26dba4ae9f1b86883224749f93e581c3d4bab69b /monitor
parentb6d12e3de44849aaa0dd5f25b8e06318a113cf7c (diff)
downloadgvfs-1751084b681cc6294b250880ef33d89d11ac50e3.tar.gz
MTP: Fix review comments.
Diffstat (limited to 'monitor')
-rw-r--r--monitor/mtp/gmtpvolumemonitor.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/monitor/mtp/gmtpvolumemonitor.c b/monitor/mtp/gmtpvolumemonitor.c
index 480e15c3..569b0c83 100644
--- a/monitor/mtp/gmtpvolumemonitor.c
+++ b/monitor/mtp/gmtpvolumemonitor.c
@@ -141,7 +141,8 @@ static void
gudev_add_device (GMtpVolumeMonitor *monitor, GUdevDevice *device, gboolean do_emit)
{
GMtpVolume *volume;
- const char *usb_bus_num, *usb_device_num;
+ const char *usb_bus_num, *usb_device_num, *uri;
+ GFile *activation_mount_root;
usb_bus_num = g_udev_device_get_property (device, "BUSNUM");
if (usb_bus_num == NULL) {
@@ -155,15 +156,11 @@ gudev_add_device (GMtpVolumeMonitor *monitor, GUdevDevice *device, gboolean do_e
return;
}
- /*
g_debug ("gudev_add_device: device %s (bus: %i, device: %i)",
g_udev_device_get_device_file (device),
usb_bus_num, usb_device_num);
- */
-
- gchar *uri = g_strdup_printf ("mtp://[usb:%s,%s]", usb_bus_num, usb_device_num);
- GFile *activation_mount_root;
+ uri = g_strdup_printf ("mtp://[usb:%s,%s]", usb_bus_num, usb_device_num);
activation_mount_root = g_file_new_for_uri (uri);
g_free (uri);
@@ -189,7 +186,7 @@ gudev_remove_device (GMtpVolumeMonitor *monitor, GUdevDevice *device)
sysfs_path = g_udev_device_get_sysfs_path (device);
- /* g_debug ("gudev_remove_device: %s", g_udev_device_get_device_file (device)); */
+ g_debug ("gudev_remove_device: %s", g_udev_device_get_device_file (device));
for (l = monitor->device_volumes; l != NULL; l = ll) {
GMtpVolume *volume = G_MTP_VOLUME (l->data);
@@ -197,7 +194,7 @@ gudev_remove_device (GMtpVolumeMonitor *monitor, GUdevDevice *device)
ll = l->next;
if (g_mtp_volume_has_path (volume, sysfs_path)) {
- /* g_debug ("gudev_remove_device: found volume %s, deleting", sysfs_path); */
+ g_debug ("gudev_remove_device: found volume %s, deleting", sysfs_path);
g_signal_emit_by_name (monitor, "volume_removed", volume);
g_signal_emit_by_name (volume, "removed");
g_mtp_volume_removed (volume);
@@ -212,12 +209,12 @@ on_uevent (GUdevClient *client, gchar *action, GUdevDevice *device, gpointer use
{
GMtpVolumeMonitor *monitor = G_MTP_VOLUME_MONITOR (user_data);
- /* g_debug ("on_uevent: action=%s, device=%s", action, g_udev_device_get_device_file(device)); */
+ g_debug ("on_uevent: action=%s, device=%s", action, g_udev_device_get_device_file(device));
/* filter out uninteresting events */
if (!g_udev_device_has_property (device, "ID_MTP_DEVICE"))
{
- /* g_debug ("on_uevent: discarding, not ID_MTP"); */
+ g_debug ("on_uevent: discarding, not ID_MTP");
return;
}