Blob Blame History Raw
Index: src/manager.c
===================================================================
RCS file: /cvs/gnome/gnome-volume-manager/src/manager.c,v
retrieving revision 1.128
diff -u -p -r1.128 manager.c
--- src/manager.c	10 Feb 2006 22:08:25 -0000	1.128
+++ src/manager.c	19 Feb 2006 15:10:50 -0000
@@ -2050,9 +2050,12 @@ block_device_added (const char *udi, con
 	char *fsusage = NULL, *device = NULL, *storage_device = NULL;
 	DBusError error;
 	int mountable;
+	int crypto;
 	
 	dbus_error_init (&error);
-	
+
+	crypto = FALSE;
+
 	/* is this a mountable volume? */
 	if (!(mountable = libhal_device_get_property_bool (hal_ctx, udi, "block.is_volume", NULL))) {
 		dbg ("not a mountable volume: %s\n", udi);
@@ -2065,6 +2068,7 @@ block_device_added (const char *udi, con
 		goto out;
 	}
 	
+
 	if (mountable) {
 		/* only mount if the block device has a sensible filesystem */
 		if (!(fsusage = libhal_device_get_property_string (hal_ctx, udi, "volume.fsusage", &error))) {
@@ -2074,6 +2078,7 @@ block_device_added (const char *udi, con
 			dbg ("encrypted volume found: %s\n", udi);
 			/* TODO: handle encrypted volumes */
 			mountable = FALSE;
+			crypto = TRUE;
 		} else if (strcmp (fsusage, "filesystem") != 0) {
 			dbg ("no sensible filesystem for %s\n", udi);
 			mountable = FALSE;
@@ -2097,7 +2102,7 @@ block_device_added (const char *udi, con
 			goto out;
 	}
 	
-	if (config.automount_drives && mountable) {
+	if (config.automount_drives && (mountable || crypto)) {
 		if (!gvm_udi_is_subfs_mount (udi)) {
 			if (gvm_automount_enabled (udi)) {
 				gvm_device_mount (udi, TRUE);
@@ -2106,7 +2111,7 @@ block_device_added (const char *udi, con
 			}
 		}
 	}
-	
+
  out:
 	
 	if (dbus_error_is_set (&error))
@@ -2666,7 +2671,7 @@ mount_all (LibHalContext *ctx)
 		if (!libhal_device_property_exists (ctx, udi, "volume.fsusage", NULL))
 			continue;
 		prop = libhal_device_get_property_string (ctx, udi, "volume.fsusage", NULL);
-		if (!prop || strcmp (prop, "filesystem") != 0) {
+		if (!prop || ((strcmp (prop, "filesystem") != 0) && (strcmp (prop, "crypto") != 0))) {
 			libhal_free_string (prop);
 			continue;
 		}