summaryrefslogtreecommitdiff
blob: 0c19cfe1b4fae62742deacf4980207c2c6b40139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
===================================================================
RCS file: /cvs/gnome/gnome-volume-manager/src/manager.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- manager.c	2004/08/30 14:53:09	1.30
+++ manager.c	2004/09/01 19:17:41	1.31
@@ -659,7 +659,8 @@
  * 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 @@
 		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 @@
 					  "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 @@
 
 		/* 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,