Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-volume-manager/ChangeLog,v
retrieving revision 1.95
diff -u -p -r1.95 ChangeLog
--- ChangeLog 30 Aug 2004 17:54:11 -0000 1.95
+++ ChangeLog 1 Sep 2004 01:11:49 -0000
@@ -1,3 +1,13 @@
+2004-09-01 David Zeuthen <david@fubar.dk>
+
+ * src/manager.c:
+ (gvm_media_changed): Take device parameter and just mount anything
+ that is not a disc; fixes issue where hal says drive supports removable
+ media when not sure (as opposed to earlier where hal said nonremovable
+ media)
+ (hal_device_added): Pass device parameter
+ (mount_all): volume.is_filesystem is replaced by volume.fsusage in hal
+
2004-08-30 Robert Love <rml@ximian.com>
* configure.in: bump version to 0.9.10
Index: src/manager.c
===================================================================
RCS file: /cvs/gnome/gnome-volume-manager/src/manager.c,v
retrieving revision 1.30
diff -u -p -r1.30 manager.c
--- src/manager.c 30 Aug 2004 14:53:09 -0000 1.30
+++ src/manager.c 1 Sep 2004 01:11:49 -0000
@@ -659,7 +659,8 @@ out:
* At the moment, we only handle CD-ROM and DVD drives.
*/
static void
-gvm_media_changed (const char *udi, const char *storage_device)
+gvm_media_changed (const char *udi, const char *storage_device,
+ const char *device)
{
char *media_type;
@@ -674,10 +675,14 @@ gvm_media_changed (const char *udi, cons
return;
}
- if (!g_strcasecmp (media_type, "cdrom"))
+ if (!g_strcasecmp (media_type, "cdrom")) {
gvm_cdrom_policy (udi);
-
- /* other media_types go here */
+ } else {
+ dbg ("Added: %s\n", device);
+
+ if (config.automount_drives)
+ gvm_device_mount (device);
+ }
hal_free_string (media_type);
}
@@ -730,7 +735,7 @@ hal_device_added (LibHalContext *ctx __a
"storage.removable")) {
/* we handle media change events separately */
dbg ("Changed: %s\n", device);
- gvm_media_changed (udi, storage_device);
+ gvm_media_changed (udi, storage_device, device);
goto out;
}
@@ -952,9 +957,10 @@ static void mount_all (LibHalContext *ct
/* only mount if the block device got a sensible filesystem */
if (!hal_device_property_exists (ctx, udi,
- "volume.is_filesystem") ||
- !hal_device_get_property_bool (ctx, udi,
- "volume.is_filesystem"))
+ "volume.fsusage") ||
+ strcmp (hal_device_get_property_string (ctx, udi,
+ "volume.fsusage"),
+ "filesystem") != 0)
continue;
device_file = hal_device_get_property_string (ctx, udi,