head	1.6;
access;
symbols
	old_RELEASE_4_3_0:1.3
	old_RELEASE_4_2_0:1.1
	old_RELEASE_4_1_1:1.1;
locks; strict;
comment	@# @;


1.6
date	2001.07.06.12.51.34;	author sobomax;	state dead;
branches;
next	1.5;

1.5
date	2001.05.14.17.18.52;	author sobomax;	state Exp;
branches;
next	1.4;

1.4
date	2001.05.04.21.51.15;	author ade;	state Exp;
branches;
next	1.3;

1.3
date	2001.02.01.20.16.40;	author sobomax;	state Exp;
branches;
next	1.2;

1.2
date	2001.01.12.19.59.39;	author ade;	state Exp;
branches;
next	1.1;

1.1
date	2000.09.14.17.57.57;	author ade;	state Exp;
branches;
next	;


desc
@@


1.6
log
@Update to 1.0.4. Still doesn't work (hangs at startup)... :-<
@
text
@
$FreeBSD: ports/x11-fm/nautilus/files/patch-ac,v 1.5 2001/05/14 17:18:52 sobomax Exp $

--- libnautilus-private/nautilus-volume-monitor.c.orig	Fri Apr 27 04:19:07 2001
+++ libnautilus-private/nautilus-volume-monitor.c	Mon May 14 18:36:00 2001
@@@@ -67,6 +67,12 @@@@
 #define MOUNT_TABLE_PATH _PATH_MNTTAB
 #endif
 
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#include <sys/ucred.h>
+#include <sys/mount.h>
+#endif
+
 #ifdef HAVE_SYS_MNTTAB_H
 #define SOLARIS_MNT 1
 #include <sys/mnttab.h>
@@@@ -119,6 +125,8 @@@@
 
 #ifdef HAVE_SYS_MNTTAB_H
 typedef struct mnttab MountTableEntry;
+#elif defined __FreeBSD__
+typedef struct fstab MountTableEntry;
 #else
 typedef struct mntent MountTableEntry;
 #endif
@@@@ -349,12 +357,18 @@@@
 static gboolean
 has_removable_mntent_options (MountTableEntry *ent)
 {
+#ifndef __FreeBSD__
 	/* Use "owner" or "user" or "users" as our way of determining a removable volume */
 	if (hasmntopt (ent, "user") != NULL
 	    || hasmntopt (ent, "users") != NULL
 	    || hasmntopt (ent, "owner") != NULL) {
 		return TRUE;
 	}
+#else
+	if (strstr (ent->fs_mntops, "noauto") != NULL) {
+		return TRUE;
+	}
+#endif
 
 #ifdef SOLARIS_MNT
 	if (eel_str_has_prefix (ent->mnt_special, "/vol/")) {
@@@@ -377,6 +391,7 @@@@
 {
 	FILE *file;
 	GList *volumes;
+
 	MountTableEntry *ent;
 	NautilusVolume *volume;
 #ifdef HAVE_SYS_MNTTAB_H
@@@@ -385,11 +400,16 @@@@
 	
 	volumes = NULL;
 	
+#ifndef __FreeBSD__
 	file = setmntent (MOUNT_TABLE_PATH, "r");
 	if (file == NULL) {
 		return NULL;
 	}
+#else
+	setfsent();
+#endif /* __FreeBSD__ */
 	
+#ifndef __FreeBSD__
 #ifdef HAVE_SYS_MNTTAB_H
         ent = &ent_storage;
 	while (! getmntent (file, ent)) {
@@@@ -409,8 +429,20 @@@@
 		}
 	}
 #endif /* HAVE_SYS_MNTTAB_H */
-			
+
 	fclose (file);
+			
+#else	/* __FreeBSD__ */
+	while ((ent = getfsent ()) != NULL) {
+		/* Use noauto as our way of determining a removable volume */
+		if (strstr (ent->fs_mntops, "noauto") != NULL) {
+			volume = create_volume (ent->fs_spec, ent->fs_file, ent->fs_vfstype);
+			volumes = mount_volume_add_filesystem (volume, volumes);
+		}
+	}
+
+	endfsent();
+#endif /* __FreeBSD__ */
 	
 #ifdef HAVE_CDDA
 	volume = create_volume (CD_AUDIO_PATH, CD_AUDIO_PATH, CDDA_SCHEME);
@@@@ -427,18 +459,27 @@@@
 static gboolean
 volume_is_removable (const NautilusVolume *volume)
 {
+#ifndef	__FreeBSD__
 	FILE *file;
      	MountTableEntry *ent;
 #ifdef HAVE_SYS_MNTTAB_H
 	MountTableEntry ent_storage;
 #endif
+#else	/* __FreeBSD__ */
+	struct fstab *ent;
+#endif	/* __FreeBSD__ */
 
+#ifndef __FreeBSD__
 	file = setmntent (MOUNT_TABLE_PATH, "r");
 	if (file == NULL) {
 		return FALSE;
 	}
+#else
+	setfsent();
+#endif	/* __FreeBSD__ */
 	
 	/* Search for our device in the fstab */
+#ifndef __FreeBSD__
 #ifdef HAVE_SYS_MNTTAB_H
 	MountTableEntry *ent = &ent_storage;
 	while (!getmntent (file, ent)) {
@@@@ -460,8 +501,22 @@@@
 		}	
 	}
 #endif /* HAVE_SYS_MNTTAB_H */
+#else  /* __FreeBSD__ */
+	while ((ent = getfsent ()) != NULL) {
+		/* Use noauto as our way of determining a removable volume */
+		if (strcmp (volume->device_path, ent->fs_spec) == 0
+		    && has_removable_mntent_options (ent)) {
+			endfsent();
+			return TRUE;
+		}
+	}
+
+	endfsent();
+#endif	/* __FreeBSD__ */
 	
+#ifndef __FreeBSD__
 	fclose (file);
+#endif
 	return FALSE;
 }
 
@@@@ -490,12 +545,17 @@@@
  		}
  	}
 #else
+#ifndef __FreeBSD__
 	file = setmntent (MOUNT_TABLE_PATH, "r");
 	if (file == NULL) {
 		return FALSE;
 	}
+#else
+	setfsent();
+#endif	/* __FreeBSD__ */
 		
 	/* Search for our device in the fstab */
+#ifndef __FreeBSD__
 	while ((ent = getmntent (file)) != NULL) {
 		if (strcmp (volume->device_path, ent->mnt_fsname) == 0) {
 			if (strstr (ent->mnt_opts, MNTOPT_RO) != NULL) {
@@@@ -504,9 +564,22 @@@@
 			}
         	 }
 	}
+#else	/* __FreeBSD__ */
+	while ((ent = getfsent ()) != NULL) {
+		if (strcmp (volume->device_path, ent->fs_spec) == 0
+		    && strstr (ent->fs_type, FSTAB_RO) != NULL) {
+			endfsent();
+			return TRUE;
+		}
+	}
+
+	endfsent();
+#endif	/* __FreeBSD__ */
 #endif
 				
+#ifndef __FreeBSD__
 	fclose (file);
+#endif
 	return FALSE;
 }
 
@@@@ -948,13 +1021,20 @@@@
 		}
 	}
 #else
+#ifndef __FreeBSD__
 	const char *file_name;
 	const char *separator;
 	char line[PATH_MAX * 3];
 	char device_name[sizeof (line)];
 	EelStringList *list;
 	char *device_path, *mount_path, *filesystem;
+#else	/* __FreeBSD__ */
+	struct statfs *mounted;
+	int mounted_num;
+	int i;
+#endif	/* __FreeBSD__ */
 
+#ifndef __FreeBSD__
 	if (mnttab_exists) { 
 		file_name = "/etc/mnttab";
 		separator = "\t";
@@@@ -967,7 +1047,15 @@@@
 		g_warning ("Unable to open %s: %s", file_name, strerror (errno));
 		return NULL;
 	}
+#else	/* __FreeBSD__ */
+	mounted_num = getmntinfo(&mounted, MNT_WAIT);
+	if (mounted_num < 1) {
+		g_warning ("Unable to get info about mounted fs: %s", strerror (errno));
+		return NULL;
+	}
+#endif	/* __FreeBSD__ */
 
+#ifndef __FreeBSD__
 	while (fgets (line, sizeof(line), fh)) {
 		if (sscanf (line, "%s", device_name) == 1) {
 			list = eel_string_list_new_from_tokens (line, separator, FALSE);
@@@@ -983,17 +1071,28 @@@@
 					g_free (device_path);
 					g_free (mount_path);
 					g_free (filesystem);
+#else /* __FreeBSD__ */
+	for (i = 0; i < mounted_num; i++) {
+		volume = g_new0 (NautilusVolume, 1);
+		volume->device_path = g_strdup(mounted[i].f_mntfromname);
+		volume->mount_path = g_strdup(mounted[i].f_mntonname);
+		volume->filesystem = g_strdup(mounted[i].f_fstypename);
+#endif /* __FreeBSD__ */
 					current_mounts = mount_volume_add_filesystem (volume, current_mounts);
+#ifndef __FreeBSD__
 				}				
 				eel_string_list_free (list);
 			}			
 		}
+#endif /* __FreeBSD__ */
   	}
 #endif /* SOLARIS_MNT */
 
+#ifndef __FreeBSD__
 	if (fh != NULL) {
 		fclose (fh);
 	}
+#endif
 	
 #ifdef HAVE_CDDA
 	/* CD Audio tricks */
@@@@ -1888,7 +1987,7 @@@@
 	for (element = volume_list; element != NULL; element = element->next) {
 		volume = element->data;
 		
-#ifndef SOLARIS_MNT
+#if !defined(SOLARIS_MNT) && !defined(__FreeBSD__)
 		/* These are set up by get_current_mount_list for Solaris. */
 		volume->is_removable = volume_is_removable (volume);
 		volume->is_read_only = volume_is_read_only (volume);
@


1.5
log
@Update to 1.0.3.
@
text
@d2 1
a2 1
$FreeBSD$
@


1.4
log
@The new GNOME 1.4 "Fifth-Toe" metaport, bringing together a whole
bunch of GNOME applications under one convenient building mechanism.

Applications include:

mozilla, galeon, gabber, pan, gnumeric, sodipodi, atomix, balsa,
bombermaze, dia, eog, gedit, gimp, glimmer, gnomeicu, gob, gtm,
gnucash and abiword.
@
text
@d4 4
a7 4
--- libnautilus-extensions/nautilus-volume-monitor.c.orig	Sat Feb 24 01:54:34 2001
+++ libnautilus-extensions/nautilus-volume-monitor.c	Sun Mar 11 15:46:11 2001
@@@@ -68,6 +68,12 @@@@
 #include <mntent.h>
d19 1
a19 3
@@@@ -327,6 +333,12 @@@@
 has_removable_mntent_options (struct mnttab *ent)
 {
d21 4
a24 6
+#elif defined(__FreeBSD__)
+
+static gboolean
+has_removable_mntent_options (struct fstab *ent)
+{
+
d26 3
a28 1
 
d30 2
a31 4
@@@@ -335,12 +347,18 @@@@
 
 #endif /* HAVE_SYS_MNTTAB_H */
 
d37 1
a37 1
 	    return TRUE;
d45 3
a47 5
 #if SOLARIS_MNT && HAVE_VOL
        if (strstr (ent->mnt_special, "/vol/") == ent->mnt_special) {
@@@@ -360,23 +378,32 @@@@
 static GList *
 get_removable_volumes (void)
a48 1
+#ifndef __FreeBSD__
d50 3
a52 11
-	GList *volumes;
 #if HAVE_SYS_MNTTAB_H
         struct mnttab dummy_ent;
         struct mnttab *ent = &dummy_ent;
 #else
 	struct mntent *ent;
 #endif /* HAVE_SYS_MNTTAB_H */
+#else  /* __FreeBSD__ */
+struct fstab *ent;
+#endif /* __FreeBSD__ */
+	GList *volumes;
d54 2
d60 1
a60 1
 	file = setmntent (PATH_MOUNT_TABLE, "r");
d69 2
a70 1
 #if HAVE_SYS_MNTTAB_H
d72 3
a74 4
 		/* On Solaris look for /vol/ for determining a removable volume */
@@@@ -396,12 +423,27 @@@@
 			volume->filesystem = g_strdup (ent->mnt_type);
 
d76 5
a80 1
+#else  /* __FreeBSD__ */
d84 6
a89 6
+			volume = g_new0 (NautilusVolume, 1);
+			volume->device_path = g_strdup (ent->fs_spec);
+			volume->mount_path = g_strdup (ent->fs_file);
+			volume->filesystem = g_strdup (ent->fs_vfstype);
+			volume->is_removable = TRUE;
+			volume->is_read_only = (strstr (ent->fs_type, FSTAB_RO) !=NULL);
a90 10
 
 			volumes = mount_volume_add_filesystem (volume, volumes);
 		}	
 	}
 			
+#ifndef __FreeBSD__
 	fclose (file);
+#else
+	endfsent();
+#endif
d92 3
a94 3
 #ifdef MOUNT_AUDIO_CD
 	volume = g_new0 (NautilusVolume, 1);
@@@@ -419,6 +461,7 @@@@
d98 1
a98 1
+#ifndef __FreeBSD__
d100 5
a104 7
 #if HAVE_SYS_MNTTAB_H
 	struct mnttab dummy_ent;
@@@@ -426,13 +469,21 @@@@
 #else
      	struct mntent *ent;
 #endif /* HAVE_SYS_MNTTAB_H */
+#else  /* __FreeBSD__ */
d106 2
a107 2
+#endif /* __FreeBSD__ */
 	
d109 1
a109 1
 	file = setmntent (PATH_MOUNT_TABLE, "r");
d115 1
a115 1
+#endif /* __FreeBSD__ */
d119 2
a120 1
 #if HAVE_SYS_MNTTAB_H
d122 2
a123 2
 		if (strcmp (volume->device_path, ent->mnt_special) == 0) {
@@@@ -455,8 +506,23 @@@@
a124 1
 
a125 1
-	
d131 2
a132 2
+		    	endfsent();
+		    	return TRUE;
a134 2
+#endif /* __FreeBSD__ */
+			
d136 4
a139 1
+#ifndef __FreeBSD__	
a140 2
+#else
+	endfsent();
d145 1
a145 1
@@@@ -484,14 +550,23 @@@@
d150 1
a150 8
 	struct mntent *ent;
-	
+#else
+	struct fstab *ent;
+#endif
+
+#ifndef __FreeBSD__
 	file = setmntent (PATH_MOUNT_TABLE, "r");
a153 1
-		
d156 2
a157 2
+#endif /* __FreeBSD__ */
+
d163 1
a163 1
@@@@ -500,9 +575,21 @@@@
d167 1
a167 1
+#else  /* __FreeBSD__ */
d171 2
a172 2
+		    	endfsent();
+		    	return TRUE;
d175 1
d177 1
a177 1
+#endif
d186 3
a188 3
@@@@ -975,14 +1062,26 @@@@
         
        
d191 2
d195 3
a197 2
 	NautilusStringList *list;
+#else  /* __FreeBSD__ */
d201 1
a201 1
+#endif /* __FreeBSD__ */
d204 8
a211 4
 	/* Open /proc/mounts */
 	fh = fopen (PATH_PROC_MOUNTS, "r");
 	g_return_val_if_fail (fh != NULL, NULL);
+#else   /* __FreeBSD__ */
d213 5
a217 2
+	g_return_val_if_fail (mounted_num > 0, NULL);
+#endif  /* __FreeBSD__ */
d222 5
a226 5
 			list = nautilus_string_list_new_from_tokens (line, PROC_MOUNTS_SEPARATOR, FALSE);			
@@@@ -995,11 +1094,20 @@@@
 					volume->device_path = nautilus_string_list_nth (list, 0);
 					volume->mount_path = nautilus_string_list_nth (list, 1);
 					volume->filesystem = nautilus_string_list_nth (list, 2);
d237 1
a237 1
 				nautilus_string_list_free (list);
a241 1
 
a242 3
@@@@ -1019,7 +1127,9 @@@@
 	}
 #endif
d245 3
a247 1
 	fclose (fh);
d250 7
a256 22
 	return current_mounts;
 
@@@@ -1375,6 +1485,14 @@@@
 			break;
 		}
 	}
+#ifdef __FreeBSD__
+	struct fstab *ent;
+
+	setfsent ();
+	while ((ent = getfsent ())) 
+		fstab_add_mount_volume (monitor, ent);
+	endfsent ();
+#endif	/* __FreeBSD__ */
 }
 #endif
 
@@@@ -1869,7 +1987,7 @@@@
 	}
 	
 	if (mounted) {
-#ifndef SOLARIS_MNT			
d258 1
a260 1
 #endif /* SOLARIS_MNT */
@


1.3
log
@Update to 0.8. Unfortunately it doesn't work apart from setup wizard, so
use it cautiously and don't forget to let me know if you managed to fix it.
@
text
@d4 4
a7 4
--- libnautilus-extensions/nautilus-volume-monitor.c.orig	Tue Jan 16 03:31:56 2001
+++ libnautilus-extensions/nautilus-volume-monitor.c	Wed Jan 31 21:29:21 2001
@@@@ -60,7 +60,13 @@@@
 #include <fstab.h>
d14 29
d44 3
a46 1
 #include <mntent.h>
d49 5
a53 5
 #ifdef MOUNT_AUDIO_CD
 
@@@@ -264,16 +270,25 @@@@
 GList *
 nautilus_volume_monitor_get_removable_volumes (NautilusVolumeMonitor *monitor)
d58 4
d63 4
a66 3
+#else
+	struct fstab *ent;
+#endif
d73 4
a76 2
 	file = setmntent (_PATH_MNTTAB, "r");
 	g_return_val_if_fail (file != NULL, NULL);
d79 1
a79 1
+#endif
d82 4
a85 6
 	while ((ent = getmntent (file)) != NULL) {
 		/* Use noauto as our way of determining a removable volume */
 		if (strstr (ent->mnt_opts, MNTOPT_NOAUTO) != NULL) {
@@@@ -281,6 +296,15 @@@@
 			volume->device_path = g_strdup (ent->mnt_fsname);
 			volume->mount_path = g_strdup (ent->mnt_dir);
d87 3
a89 1
+#else /* FreeBSD, probably ;) */
d97 5
a101 5
+#endif
 			if (mount_volume_add_filesystem (volume)) {
 				mount_volume_get_name (volume);
 				volumes = g_list_append (volumes, volume);
@@@@ -290,7 +314,11 @@@@
d113 3
a115 1
@@@@ -682,15 +710,27 @@@@
a116 2
 	GList *current_mounts = NULL;
 	NautilusVolume *volume = NULL;
d118 103
a220 1
 	FILE *fh;
d224 1
a224 1
+#else
d228 1
a228 1
+#endif
d234 1
a234 1
+#else
d237 1
a237 1
+#endif
d242 2
a243 2
 				list = nautilus_string_list_new_from_tokens (line, " ", FALSE);
@@@@ -702,17 +742,25 @@@@
d247 1
a247 2
-
+#else
d254 1
a254 6
 					if (mount_volume_add_filesystem (volume)) {
 						mount_volume_get_name (volume);
 						current_mounts = g_list_append (current_mounts, volume);
 					} else {
 						nautilus_volume_monitor_free_volume (volume);
 					}					
d260 1
a260 1
+#endif
d263 2
a264 2
 #ifdef MOUNT_AUDIO_CD
@@@@ -728,7 +776,9 @@@@
d274 1
a274 47
@@@@ -889,6 +939,45 @@@@
 	return TRUE;
 }
 
+#ifdef 0
+#ifdef __FreeBSD__
+static void
+fstab_add_mount_volume (NautilusVolumeMonitor *monitor, struct fstab *ent)
+{
+	NautilusVolume *volume;
+	gboolean mounted;
+
+	volume = g_new0 (NautilusVolume, 1);
+	volume->device_path = g_strdup(ent->fs_spec);
+	volume->mount_path = g_strdup(ent->fs_file);
+
+	mounted = FALSE;
+
+	if (nautilus_str_has_prefix (ent->fs_spec, "/dev/fd")) {
+		mounted = mount_volume_floppy_add (monitor, volume);
+	} else if (strcmp (ent->fs_vfstype, "ufs") == 0) {
+		mounted = mount_volume_ext2_add (volume);
+	} else if (strcmp (ent->fs_vfstype, "nfs") == 0) {
+		mounted = mount_volume_nfs_add (volume);
+	} else if (strcmp (ent->fs_vfstype, "cd9660") == 0) {
+		mounted = mount_volume_iso9660_add (volume);
+	} else if (strcmp (ent->fs_vfstype, "msdos") == 0) {
+		mounted = mount_volume_msdos_add (volume);
+	}
+
+	if (mounted) {
+		volume->is_read_only = strstr (ent->fs_type, FSTAB_RO) != NULL;
+		monitor->details->volumes = g_list_append (monitor->details->volumes, volume);
+		mount_volume_add_aliases (monitor, volume->device_path, volume);
+	} else {
+		g_free (volume->device_path);
+		g_free (volume->mount_path);
+		g_free (volume);
+	}
+}
+#endif
+#endif
+
 static void
 cdrom_ioctl_get_info (int fd)
 {
@@@@ -1025,6 +1114,14 @@@@
d289 9
@


1.2
log
@Long-awaited update to 0.5 -- goes "bang" fairly quickly, spewing corefiles
all over the place.  If some enterprising hacker wants to figure out why,
patches are more than welcome, both to me and the nautilus developers.
@
text
@d1 9
a9 4
--- libnautilus-extensions/nautilus-volume-monitor.c.orig	Thu Oct 19 16:51:16 2000
+++ libnautilus-extensions/nautilus-volume-monitor.c	Fri Jan 12 11:05:57 2001
@@@@ -60,4 +60,9 @@@@
 #else
d12 1
d16 116
d133 3
d137 2
d140 3
a142 1
@@@@ -935,2 +940,40 @@@@
d144 1
d153 1
a153 1
+	volume->fsname = g_strdup(ent->fs_spec);
d173 1
a173 1
+		mount_volume_add_aliases (monitor, volume->fsname, volume);
d175 1
a175 1
+		g_free (volume->fsname);
d180 2
a181 2
+
+#else
d184 1
a184 10
@@@@ -946,3 +989,3 @@@@
 	mounted = FALSE;
-	
+
 	if (nautilus_str_has_prefix (ent->mnt_fsname, FLOPPY_DEVICE_PATH_PREFIX)) {		
@@@@ -993,2 +1036,3 @@@@
 }
+#endif /* __FreeBSD__ */
 #endif /* HAVE_SYS_MNTTAB_H */
@@@@ -1021,2 +1065,11 @@@@
d186 4
d197 2
a198 4
+#else
+
 	FILE *mef;
@@@@ -1055,2 +1108,4 @@@@
a199 2
+
+#endif	/* __FreeBSD__ */
@


1.1
log
@Add nautilus, the file manager and graphical shell being
developed for GNOME 2.0

Please note:  as it stands, this port compiles and installs
cleanly, but immediately coredumps if you try to run it.
I've only committed what I have so far so that any enterprising
souls can try and figure out what on earth is going wrong.

Bug report 3075 has been filed with bugzilla.eazel.com
@
text
@d1 5
a5 6
--- libnautilus-extensions/nautilus-volume-monitor.c.orig	Thu Aug  3 17:15:57 2000
+++ libnautilus-extensions/nautilus-volume-monitor.c	Tue Aug 22 17:45:07 2000
@@@@ -22,6 +22,9 @@@@
    Authors: Gene Z. Ragan <gzr@@eazel.com>
 */
 
d8 44
a52 62
 #include <config.h>
 
 #include <errno.h>
@@@@ -31,7 +34,6 @@@@
 #include <gnome.h>
 #include <libgnome/gnome-i18n.h>
 #include <libgnomevfs/gnome-vfs.h>
-#include <mntent.h>
 #include <libnautilus-extensions/nautilus-cdrom-extensions.h>
 #include <libnautilus-extensions/nautilus-directory-private.h>
 #include <libnautilus-extensions/nautilus-file-utilities.h>
@@@@ -48,6 +50,11 @@@@
 #include <sys/types.h>
 #include <xmlmemory.h>
 
+#undef MOUNT_TYPE_ISO9660
+#define MOUNT_TYPE_ISO9660	"cd9660"
+#undef MOUNT_TYPE_EXT2
+#define MOUNT_TYPE_EXT2		"ufs"		/* really ufs */
+#define _PATH_MOUNTED		"/etc/fstab"
 
 /* FIXME: Remove messages when this code is done. */
 #define MESSAGE g_message
@@@@ -91,7 +98,7 @@@@
 									 DeviceInfo             	*device);
 static void     mount_device_activate_floppy                          	(NautilusVolumeMonitor      	*view,
 									 DeviceInfo             	*device);
-static gboolean	mntent_is_removable_fs					(struct mntent 	  		*ent);
+static gboolean	mntent_is_removable_fs					(struct fstab 	  		*ent);
 static void	free_device_info             				(DeviceInfo             	*device,
 						 	 	 	 NautilusVolumeMonitor      	*monitor);
 static gboolean	add_mount_link_property 				(const char 			*path);
@@@@ -197,21 +204,19 @@@@
 fm_desktop_get_removable_volume_list (void)
 {
 	GList *list;
-	FILE *mef;
-	struct mntent *ent;
+	struct fstab *ent;
 
 	list = NULL;
 
-	mef = setmntent (_PATH_FSTAB, "r");
-	g_return_val_if_fail (mef, NULL);
+	setfsent();
 
-	while ((ent = getmntent (mef))) {
+	while ((ent = getfsent ())) {
 		if (mntent_is_removable_fs (ent)) {
-			list = g_list_append (list, g_strdup (ent->mnt_dir));
+			list = g_list_append (list, g_strdup (ent->fs_file));
 			continue;
 		}
 	}
-  	endmntent (mef);
+  	endfsent ();
 
 	/* Move all floppy mounts to top of list */
 	list = g_list_sort (list, (GCompareFunc) floppy_sort);
@@@@ -754,7 +759,7 @@@@
 
 
d54 1
a54 17
-add_mount_device (NautilusVolumeMonitor *monitor, struct mntent *ent)
+add_mount_device (NautilusVolumeMonitor *monitor, struct fstab *ent)
 {
 	DeviceInfo *newdev = NULL;
 	gboolean mounted;
@@@@ -762,23 +767,23 @@@@
 	newdev = g_new0 (DeviceInfo, 1);
 	g_assert (newdev);
 	newdev->device_fd   = -1;
-	newdev->fsname 	    = g_strdup (ent->mnt_fsname);
-	newdev->mount_path  = g_strdup (ent->mnt_dir);
+	newdev->fsname 	    = g_strdup (ent->fs_spec);
+	newdev->mount_path  = g_strdup (ent->fs_file);
 	newdev->volume_name = NULL;
 	newdev->link_uri    = NULL;
 	newdev->state 	    = STATE_EMPTY;
 
d56 4
a59 18
 	
-	if (strcmp (ent->mnt_type, MOUNT_TYPE_ISO9660) == 0) {		
+	if (strcmp (ent->fs_type, MOUNT_TYPE_ISO9660) == 0) {		
     		mounted = mount_device_iso9660_add (monitor, newdev); 
-	} else if (strncmp (ent->mnt_fsname, "/dev/fd", strlen("/dev/fd")) == 0) {		
+	} else if (strncmp (ent->fs_file, "/dev/fd", strlen("/dev/fd")) == 0) {		
 		mounted = mount_device_floppy_add (monitor, newdev);
-	} else if (strcmp (ent->mnt_type, MOUNT_TYPE_EXT2) == 0) {		
+	} else if (strcmp (ent->fs_type, MOUNT_TYPE_EXT2) == 0) {		
 		mounted = mount_device_ext2_add (newdev);
 	} else {
 		/* FIXME: Is this a reasonable way to report this error? */
-		MESSAGE ("Unknown file system: %s", ent->mnt_type);
+		MESSAGE ("Unknown file system: %s", ent->fs_type);
 	}
 	
 	if (mounted) {
@@@@ -794,13 +799,13 @@@@
d61 3
a63 18
 
 static gboolean
-mntent_is_removable_fs (struct mntent *ent)
+mntent_is_removable_fs (struct fstab *ent)
 {
-	if (strcmp (ent->mnt_type, MOUNT_TYPE_ISO9660) == 0) {
+	if (strcmp (ent->fs_type, MOUNT_TYPE_ISO9660) == 0) {
 		return TRUE;
 	}
 	
-	if (strncmp (ent->mnt_fsname, "/dev/fd", strlen("/dev/fd")) == 0) {
+	if (strncmp (ent->fs_file, "/dev/fd", strlen("/dev/fd")) == 0) {
 		return TRUE;
 	}
 	
@@@@ -833,14 +838,12 @@@@
 void
 nautilus_volume_monitor_find_mount_devices (NautilusVolumeMonitor *monitor)
d65 1
a65 2
-	FILE *mef;
-	struct mntent *ent;
d67 1
a67 3
 
-	mef = setmntent (_PATH_MNTTAB, "r");
-	g_return_if_fail (mef);
d69 10
a78 16
 
-	while ((ent = getmntent (mef))) {
-		MESSAGE ("Checking device %s", ent->mnt_fsname);
+	while ((ent = getfsent ())) {
+		MESSAGE ("Checking device %s", ent->fs_spec);
 
 #if 0
 		/* Think some more about these checks */
@@@@ -859,7 +862,7 @@@@
 	}
 
 
-  	endmntent (mef);
+  	endfsent ();
 
 	g_list_foreach (monitor->details->devices, (GFunc) mount_device_set_state, monitor);
@

