Patch to support devfs and mountpoints outside /mnt



Hi,

I have made a minor patch to add some kind of fallback for mounting
cdroms and floppies outside /mnt. I also made it find floppies and
cdroms using devfs devices.

I know there is a bug there somewhere (earlier today I filed it usign
bug-buddy, but I cant find it now... wonder how that works)


//Snaggen
-- 
Mattias Eriksson <snaggen acc umu se>
--- nautilus-volume-monitor.c.orig	2003-02-19 16:50:18.000000000 +0100
+++ nautilus-volume-monitor.c	2003-02-19 17:13:23.000000000 +0100
@@ -1839,6 +1839,12 @@
 		} else if (eel_str_has_prefix (volume->device_path, floppy_device_path_prefix)) {		
 			volume->device_type = NAUTILUS_DEVICE_FLOPPY_DRIVE;
 			volume->is_removable = TRUE;
+        } else if (eel_str_has_prefix (volume->device_path, "/dev/floppy")) {
+            volume->device_type = NAUTILUS_DEVICE_FLOPPY_DRIVE;
+            volume->is_removable = TRUE;
+        } else if (eel_str_has_prefix (volume->device_path, "/dev/cdrom")) {
+            volume->device_type = NAUTILUS_DEVICE_CDROM_DRIVE;
+            volume->is_removable = TRUE;
 		} else if (eel_str_has_prefix (name, "zip")) {
 			volume->device_type = NAUTILUS_DEVICE_ZIP_DRIVE;
 			volume->is_removable = TRUE;
@@ -1889,6 +1895,18 @@
 			} else {
 				volume->is_removable = FALSE;
 			}
+		} else { 
+            /* Fallback for floppy and cdrom not mounted in /mnt or /vol */
+            if (eel_str_has_prefix (volume->device_path, floppy_device_path_prefix)) {
+                volume->device_type = NAUTILUS_DEVICE_FLOPPY_DRIVE;
+                volume->is_removable = TRUE;
+            } else if (eel_str_has_prefix (volume->device_path, "/dev/floppy")) { 
+                volume->device_type = NAUTILUS_DEVICE_FLOPPY_DRIVE;
+                volume->is_removable = TRUE;
+            } else if (eel_str_has_prefix (volume->device_path, "/dev/cdrom")) {
+                volume->device_type = NAUTILUS_DEVICE_CDROM_DRIVE;
+                volume->is_removable = TRUE;
+            }
 		}
 
 	return TRUE;


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