[gvfs] gphoto2: Exit cleanly when device is removed



commit a4f0bf37825378af9042eb6d95aa0d3d2b9df8d4
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 18 18:35:28 2013 +0200

    gphoto2: Exit cleanly when device is removed
    
    As the other backends do, and removes 2 FIXMEs.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708316

 daemon/gvfsbackendgphoto2.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index 90d8dd9..2690c71 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -809,8 +809,7 @@ on_uevent (GUdevClient *client, gchar *action, GUdevDevice *device, gpointer use
       /* nuke all caches so we're a bit more valgrind friendly */
       caches_invalidate_all (gphoto2_backend);
 
-      /* TODO: need a cleaner way to force unmount ourselves */
-      exit (1);
+      g_vfs_backend_force_unmount (G_VFS_BACKEND (gphoto2_backend));
     }
 }
 
@@ -1028,8 +1027,7 @@ _hal_device_removed (LibHalContext *hal_ctx, const char *udi)
       /* nuke all caches so we're a bit more valgrind friendly */
       caches_invalidate_all (gphoto2_backend);
 
-      /* TODO: need a cleaner way to force unmount ourselves */
-      exit (1);
+      g_vfs_backend_force_unmount (G_VFS_BACKEND (gphoto2_backend));
     }
 }
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]