SOURCES: gnome-vfs2-handle-drives-without-media-detection.patch (N...

freetz freetz at pld-linux.org
Sun Aug 14 11:30:37 CEST 2005


Author: freetz                       Date: Sun Aug 14 09:30:37 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- handle drives without media detection

---- Files affected:
SOURCES:
   gnome-vfs2-handle-drives-without-media-detection.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gnome-vfs2-handle-drives-without-media-detection.patch
diff -u /dev/null SOURCES/gnome-vfs2-handle-drives-without-media-detection.patch:1.1
--- /dev/null	Sun Aug 14 11:30:37 2005
+++ SOURCES/gnome-vfs2-handle-drives-without-media-detection.patch	Sun Aug 14 11:30:32 2005
@@ -0,0 +1,32 @@
+Index: libgnomevfs/gnome-vfs-hal-mounts.c
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-hal-mounts.c,v
+retrieving revision 1.15
+diff -u -p -r1.15 gnome-vfs-hal-mounts.c
+--- libgnomevfs/gnome-vfs-hal-mounts.c	23 Jul 2005 22:28:15 -0000	1.15
++++ libgnomevfs/gnome-vfs-hal-mounts.c	10 Aug 2005 20:50:50 -0000
+@@ -1475,6 +1475,24 @@ _gnome_vfs_hal_mounts_modify_volume (Gno
+ 	 */
+ 	hal_drive = libhal_drive_from_device_file (hal_ctx, volume->priv->device_path);
+ 	if (hal_drive != NULL) {
++
++		/* handle drives that HAL can't poll and the user can still mount */
++		if (libhal_device_get_property_bool (hal_ctx, 
++						     libhal_drive_get_udi (hal_drive),
++						     "storage.media_check_enabled",
++						     NULL) == FALSE) {
++			GnomeVFSDrive *drive;
++
++			if ((drive = _gnome_vfs_volume_monitor_find_drive_by_hal_udi (
++				     GNOME_VFS_VOLUME_MONITOR (volume_monitor_daemon),
++				     libhal_drive_get_udi (hal_drive))) != NULL) {
++				volume->priv->drive = drive;
++				_gnome_vfs_drive_add_mounted_volume (drive, volume);
++				
++				goto out;
++			}
++		}
++
+ 		/* ok, this device file is in HAL and thus managed by this backend */
+ 		gnome_vfs_volume_unref (volume);
+ 		result = NULL;
================================================================



More information about the pld-cvs-commit mailing list